Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp704993rwe; Wed, 31 Aug 2022 09:32:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5T88Q8QR3wS6lDSZg3rLb9v/3SM6n8WO5y2BdprHMVDek8IMCOa3/NVQWBsNYtsWpeBrWm X-Received: by 2002:a17:907:6e21:b0:741:73f1:d19b with SMTP id sd33-20020a1709076e2100b0074173f1d19bmr11765702ejc.435.1661963564761; Wed, 31 Aug 2022 09:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661963564; cv=none; d=google.com; s=arc-20160816; b=EYQorRWtEBpPwthgDoaML56p5m8fDbErb1l5r0p77sUZo2IJbon0QMqjjTKRs5xV0x YzcVnIkKNGND31RxR9IhEfeMPe8A0Zx9A4/mzYPT50U1NNFSyGvqjqZERO4o6I0suhXl MktWYY4iYhSKq1ztbaGBHMFrblvrnCYKnoeeJQhVOxC8bip3KCWMabo5mb/5h8rba1xZ O1cvEmCjdW40opTmdT1MDD2+1gWDd9+UUkBqGAZ/NMoKZVkNuC/oGbPTFUWqrT7l5VFq ea1G2UI8o7n4BuWkUK6UgvrlEK9YOpgFOABHictajAY80V4i3XIZjX0UpvuONwtGzr28 g0HA== 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=IDuruBXPZyRpW8WGVSo/zI+lfAagsc1gmhwpLs9zMR0=; b=ovRth+VpTyVg/a5yaiLswhx9EA9lyOeslEplot+qCTZUA2LirKO/pvmnSRmU6V/98z zD2BOmKjjOd8Jno1pio0Z+o6HoYJcqrUXMki2WURHbLTZl/tcPxzgIh1b0YcdBuD8wzA ZAggxBtJg2QclkdTYRv7k48PKwojbIS4kATytzeXYguxB8QCRRKJTJlBfDwpySnj/3sP 8K1GWPEXAE+QJNBsluukcYFenACyACGah0EW7oisf3ySEvYcv+xZqUT8Sigd2IfUtRup 0v9xcv5fPZl4mVaV4GBwi8zs8k1vG9TM7A72lzltiYgirsWGN9MWOVgRIuYKYhDRLOu0 9How== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BJf4BqZJ; 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 w7-20020a056402070700b004481e62a81asi8000185edx.547.2022.08.31.09.32.18; Wed, 31 Aug 2022 09:32:44 -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=BJf4BqZJ; 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 S232117AbiHaQTP (ORCPT + 99 others); Wed, 31 Aug 2022 12:19:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbiHaQTO (ORCPT ); Wed, 31 Aug 2022 12:19:14 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B809DD2E8E; Wed, 31 Aug 2022 09:19:13 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id jm11so14565029plb.13; Wed, 31 Aug 2022 09:19:13 -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:subject:date; bh=IDuruBXPZyRpW8WGVSo/zI+lfAagsc1gmhwpLs9zMR0=; b=BJf4BqZJJFq55/bNNWWPEeMFVJDFfFmCBzIF8E8kgum69JveHcigjWKL32B9dsqd1O 0PXEILqNTo8DWARlVnU5Y9LAgDY3VYInXJ8ac1crJODNlzblwKQK6ZFuBTZ6DGtRyhXZ naOTIH8St/UUzaWcBD1R0PoRjhHPaQTuMs/7RubPsNJal1ihgDJUyWYJeA/qZONv/yeH i7s60bqRzz5lAJ+HR+sZp9aDUJA6hTrsmTxF6gBKARtq7deP+5xYwb+lml3BhcyJJkbA mthYBJq8Vl0cG40jQYt3D39BzRPlaCxWwXZC7KblkuYOS6o8Wt+yEAamUM1Gw+e3JFbs WVKw== 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:subject:date; bh=IDuruBXPZyRpW8WGVSo/zI+lfAagsc1gmhwpLs9zMR0=; b=Tj9O5JbBWBrchiG/ptFKzpiFYjdAnAqgpER1OfRnWx/HXRfWO/+ycDqKpsQm0kJA+V jV4ezqiwb3qWTvRNpRYfiSp2/NdggTD4UbNFBt/xCPUM7lwSLG5vvVBdJ2z0p0QyGpeG gNB9rkgpu7AUdUgWbSy/67/OjAGg9nh946N1DvvZdXO3dMNWNYqHITf9J4QrO1du2e4+ PiLzf6Sth//rbXY8nBP1pxaM1vjOtlWBODWdHxWgdsAiQbjchLGE84KD9aH7tf9R4wQX mIyqIY35usG/7tXP/vn9+ZimtTFWmiw0aowwbjU2V9OmDJKjemExd+1+OjShQOcm98Oj dRDA== X-Gm-Message-State: ACgBeo1E7zlAaHGBEtxhSJjNgOhZRtFiv5iizTxoeXkU7ZhZxSl0dEzL gs1XOYYF6Ix3ouy1jCDn2Tk= X-Received: by 2002:a17:90a:b007:b0:1f1:d31e:4914 with SMTP id x7-20020a17090ab00700b001f1d31e4914mr4120537pjq.36.1661962753308; Wed, 31 Aug 2022 09:19:13 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id z15-20020aa7958f000000b00536aa488062sm7418869pfj.163.2022.08.31.09.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:19:12 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: cui.jinpeng2@zte.com.cn To: wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, edumazet@google.com Cc: kuba@kernel.org, pabeni@redhat.com, mailhol.vincent@wanadoo.fr, stefan.maetje@esd.eu, socketcan@hartkopp.net, biju.das.jz@bp.renesas.com, cui.jinpeng2@zte.com.cn, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Zeal Robot Subject: [PATCH linux-next] can: sja1000: remove redundant variable ret Date: Wed, 31 Aug 2022 16:18:35 +0000 Message-Id: <20220831161835.306079-1-cui.jinpeng2@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: Jinpeng Cui Return value directly from register_candev() instead of getting value from redundant variable ret. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/net/can/sja1000/sja1000.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 98dfd5f295a7..1bb1129b0450 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c @@ -661,8 +661,6 @@ static const struct ethtool_ops sja1000_ethtool_ops = { int register_sja1000dev(struct net_device *dev) { - int ret; - if (!sja1000_probe_chip(dev)) return -ENODEV; @@ -673,9 +671,7 @@ int register_sja1000dev(struct net_device *dev) set_reset_mode(dev); chipset_init(dev); - ret = register_candev(dev); - - return ret; + return register_candev(dev); } EXPORT_SYMBOL_GPL(register_sja1000dev); -- 2.25.1