From patchwork Wed Jan 4 20:40:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 39090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5350421wrt; Wed, 4 Jan 2023 12:53:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXs1DGTrn5v/xio9XOAVhwS5qJHzh+cwtRyM+2Vmqg0wu3fNv17V0D3TWM8Sj0sy8AGCp1J1 X-Received: by 2002:a17:902:d2cd:b0:192:9c7a:e60c with SMTP id n13-20020a170902d2cd00b001929c7ae60cmr32730056plc.48.1672865581437; Wed, 04 Jan 2023 12:53:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672865581; cv=none; d=google.com; s=arc-20160816; b=zQREAPTgWul3vYzx9/Jvy4zNZBsSnsM00DxhMBZQ+msgWuxyl4gH4mXRm/tso9yU3r lMssQPEejqiBkKT+LIIwBO/ysJq4Nv5lWhjC8WVJAGfguPNDEuoZcwsvAuhWXn9piCaw 5betAG8aeL+kklB/6qSy2sdtG3SI3qx5Mx7+rUS83PwdRhcQGuF3cTERWtLpIMgmjeEJ NX/P+8Puie0jCvTpBWKG8cmdMa5c8RJeJbuV4i2Ow1PT6/PHK1zc4ecHhzz4nm0TavHB a0OK7nf+zVOznAALc7RDXQ7leHLxN08946aS0jDLc51Klp+c/5mWhg4ajh7MZ4GqMaku Y3og== 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; bh=Y1Io/VAvAtomU8XK2iVvk+iLMKppSYQtQIsNjr7nwWU=; b=tTrHgNhwmWsM+4SDUZf+Tom8kbbS4CJdIQ450nL8pMslw75M5rmnaUC30sxLsfVJM+ 4jkeO2P8M4zPhGHyfdqFVfngS7q3JTuGP/I40VUPOSS7YygIlmKubbziUdPqFLtRnm1J kLEB31HqpYimdSmyanWKsS7pLlFx+WiAAZWlOYavqsHtWt9VKzSeZ4K7X5RLfxL0oqi0 vhkr41Mb8qLG+G+l4JeoEm4LCwIdw0DcBVloGkXd3xGX2ujPXom59eqrCfc1xynNr3th QQlv7KkjC7zQb6dmFzr5FIvyGOZdki4SdQoZi++z9i9H5zoq4dpK5ckcJecy3kAtcedG AZjw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t203-20020a635fd4000000b00477ba9ec461si35674855pgb.879.2023.01.04.12.52.48; Wed, 04 Jan 2023 12:53:01 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233776AbjADUlV (ORCPT + 99 others); Wed, 4 Jan 2023 15:41:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbjADUlS (ORCPT ); Wed, 4 Jan 2023 15:41:18 -0500 Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69CA0F1C for ; Wed, 4 Jan 2023 12:41:12 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id DAZPpIg1LIwEfDAZPpB30n; Wed, 04 Jan 2023 21:41:10 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 04 Jan 2023 21:41:10 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Michal Swiatkowski , Taku Izumi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , netdev@vger.kernel.org Subject: [PATCH net-next v2] fjes: Fix an error handling path in fjes_probe() Date: Wed, 4 Jan 2023 21:40:47 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754126699848015568?= X-GMAIL-MSGID: =?utf-8?q?1754126699848015568?= free_netdev() already calls netif_napi_del(), no need to call it explicitly. It's harmless, but useless. Remove the call, make the error handling path of the probe and the remove function be consistent one with the other. Signed-off-by: Christophe JAILLET Reviewed-by: Jiri Pirko --- Change in v2: - Leave the error handling path of the probe as-is, and simplify the remove function instead. - Removes the Fixes tag. It's finally not at fix, just a consistency issue. (was Fixes: 265859309a76 ("fjes: NAPI polling function")) - As a consequence, target net-next instead of net, now. v1: https://lore.kernel.org/all/fde673f106d2b264ad76759195901aae94691b5c.1671569785.git.christophe.jaillet@wanadoo.fr/ --- drivers/net/fjes/fjes_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 5805e4a56385..db9c0da82f33 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -1324,8 +1324,6 @@ static int fjes_remove(struct platform_device *plat_dev) fjes_hw_exit(hw); - netif_napi_del(&adapter->napi); - free_netdev(netdev); return 0;