Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp106360rwe; Fri, 26 Aug 2022 01:22:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ql77QuedwuehpS7nNuUaPQEWhDSYJaMatTtQJdaEmCu3GLp/JM+wS/0YDAam6s+FhIsHr X-Received: by 2002:a63:fb4a:0:b0:429:8605:6ebf with SMTP id w10-20020a63fb4a000000b0042986056ebfmr2373963pgj.225.1661502155447; Fri, 26 Aug 2022 01:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661502155; cv=none; d=google.com; s=arc-20160816; b=emFWMW/Pd55fuS+yGXt+eawgqvo2692Hm8VFR12B+PK7u6SIevGGAnYHP8FCdDDMOA 2XgbRPQQ1Lbk20My8EGhZLk2C2uns9SEivcimpzdyLoas8tj4uHm9RjqTtOSTsCeCxqx mnWmQ6Rl5+4phjLZ/054Gi8DsaPnfqD3QvwkiFU7KpIhxZuKYVE04E2BUE8qfPsrDues dqTbTwv8TLt8CEMXfeH+aj/abqgtiaPyUNosrVOwkNXfKpQvQ06Sj/1mG3TRoMR1YXPw UeoA8WBo51sq1oHHk0c2YcoqmCprTnpICNWDMgs1ENq/AKLWXsTmI4wvMSjwbOxreI31 GHSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=j/9iHgs4l5y+aD60Vfb2kB4eAbqEKVoCHwikUayMWBA=; b=bGpG4MLrVT+PpAm7rW3HIJAz9SOeLOoMdjeMovpSohXdzDo5fUOo7L9bw+Bz5L9AZm fRf1tUP15dI9iHJV/rGUcaBiCZgPYNvoQbf0fPJsZWo1Xdql//FSrRhyk001hXigLTMq 3gP3/kUHVQ9Yq1HtO4R4XW0HgvxxUEnkf99PR85lRRx006DVAiKTQH6hWmJ0WmzyOxLl WPu1T0ySKNlP4CfxV/aIAY5DQTQDyF9loKgU1fO+GCiVnKuxfJg9TXrE8DgqAkt6Hg0e LdDf9qnB9iRFgrYIMopaw8k0K2ZfUF2EFdUCisV9kfqFcyfYi27tt2upqvCqBxSSD3cA d26g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OuCffG4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a056a000cce00b0053743a63dd1si1290803pfv.136.2022.08.26.01.22.23; Fri, 26 Aug 2022 01:22:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OuCffG4x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245110AbiHZHUD (ORCPT + 99 others); Fri, 26 Aug 2022 03:20:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245143AbiHZHUA (ORCPT ); Fri, 26 Aug 2022 03:20:00 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83B5BC19; Fri, 26 Aug 2022 00:19:58 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id f4so640531pgc.12; Fri, 26 Aug 2022 00:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=j/9iHgs4l5y+aD60Vfb2kB4eAbqEKVoCHwikUayMWBA=; b=OuCffG4xvAn209qGHVhLOsExjE4YLkvNQv25x/AYayLrOs/isW6BWvAeUr5OC2LzwN XXERUYvlqZUXvZVfhRi0wCk/lrYgU0QGKmvF/JuHttNvsDQq2dsT7ZxPCJp7MkQo/IYN Svvyo3mLzqcNabYCIKy25ypW4UH7UkMzxb2SuFjQfV20JrnGtmeXhnHlt9CKeA0q2HKS BhlE/cO6uHyEROzp6sQSoLHj/HBTbOkX6+Y3LPa15ERsF2oWJy1G3796pa5FAmhzf78I j9qqhKhIwmRXIp5+p/9ZB7w5DDbKr7FWMah2R76fSEh5jxulcwmaqZBUfgNByPaHCEPm wvGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=j/9iHgs4l5y+aD60Vfb2kB4eAbqEKVoCHwikUayMWBA=; b=QrwnmZ7Mou5jG1Kg3q/hYLrNFSnt/+ofmbNSQOEiJ1rzd+EsxSOUelRfQbbTlX+GKD 1b+ShC/Gfh7iC8qCPNKzL7x7sEJz/7w7hJrNobKdYSfp/XR/c1vO2PQrStDUS+i6otkq VcMX508nM1q+Oq1wwrWBrZk85Jd+xYlMRno9oBBG6kc0ygtJhd3+jl46IZhd9EFIPHVW LMTitFPfH134mNNqI4+hz5pN4w/Zj2+QZCTDR98YoJpRatXyz/KDWXkKXIuFisEhGwYH i8aTopx17QBZbMfqpbCeEQMt+ijFECXwDdcClCH47ApMK71O/ZfbfiQXZbEHn1y/Fa4B GdNA== X-Gm-Message-State: ACgBeo2zU20RMcPeOWbVMGK+EG8i5sGEfziLjI9Z2QvOrGYlkWU5Q5Qu GNvnQfr+Wan/jvyoVpbWBvcZVQVoURk= X-Received: by 2002:a05:6a00:1687:b0:518:6c6b:6a9a with SMTP id k7-20020a056a00168700b005186c6b6a9amr2626634pfc.81.1661498397946; Fri, 26 Aug 2022 00:19:57 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id b10-20020a170902d50a00b001730cf6f839sm823490plg.70.2022.08.26.00.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 00:19:57 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: ye.xingchen@zte.com.cn To: bjorn.andersson@linaro.org Cc: mathieu.poirier@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, ye xingchen , Zeal Robot Subject: [PATCH linux-next] rpmsg: char: Remove the unneeded result variable Date: Fri, 26 Aug 2022 07:19:54 +0000 Message-Id: <20220826071954.252485-1-ye.xingchen@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: ye xingchen Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/rpmsg/rpmsg_char.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c index 4f2189111494..0850ae34fb88 100644 --- a/drivers/rpmsg/rpmsg_char.c +++ b/drivers/rpmsg/rpmsg_char.c @@ -424,15 +424,12 @@ int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent struct rpmsg_channel_info chinfo) { struct rpmsg_eptdev *eptdev; - int ret; eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent); if (IS_ERR(eptdev)) return PTR_ERR(eptdev); - ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo); - - return ret; + return rpmsg_chrdev_eptdev_add(eptdev, chinfo); } EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create); -- 2.25.1