From patchwork Wed Jan 4 21:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 39093 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5358531wrt; Wed, 4 Jan 2023 13:12:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXuytK1PW8fc73Twul4DddRYnxaWnMZGX6p3NTofpMGFjXdwexU7jXqpvtFedqFPmXwlA5rN X-Received: by 2002:a05:6402:206c:b0:46c:ec97:b453 with SMTP id bd12-20020a056402206c00b0046cec97b453mr38146627edb.12.1672866720659; Wed, 04 Jan 2023 13:12:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672866720; cv=none; d=google.com; s=arc-20160816; b=Hury2IMCM/n0fr2PnhPlFqPt/EbSEPlJQeuUIk3x9ecp6u8BNE0u3FdcXSEPQkZJ7n sevI0jzA0JYG9pJXyqZppapFVZ3X4PiBFEzXGB5XEmks6X/FgSWiZLtbrVWMHJqVBsWi vrefis3B2XVG17DPElfUeTaEqQpm060AHgdhVJZnJF01aBO4jRuJgOyUxa8d5sGiiz24 5wvOhCnpxd60r21zbp6q4geP6sGRYC/+fcxanCcz8HO0H6EIunaGDrh2IqoZBx8M5cEc 3ov7wVnk9onQRbtDZzW1Iia56IM44JtYCUycoMfJ5jypEI/8weayam1zv02Q/aT7v6EI F15A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CcPGg1+asm+plyBf4pV6/nUVMJAMh4PE5e9CDsKlXcQ=; b=VjGoPgC09/rJdjYUJxFnGnI4wzeJGf+Wpcmf5bz33COaiB1jEKjEw2eFdERHF1nTDP vj3wXGPDfeWO7M0/mKhZasVsEs+TuEsYEivS/63+40hjsDTJCMUOMfyOLmUIZCwhhnF4 FhCZdzJMGn61/eBeqikWqyCfY+4zuXxPg66dhCZyA0hzWTBCQfK5yr8W69ruhmJM3TX1 y5+lg97yBjB2n+CxtBZejVXaXuJL34RXi18EV4BcqtJEFmRVZsXbUvcmCLb7aYzNvzSY lh1v5iMg2lb5XAyFn3JI3V2kkXCOpdlquictDF4eythgKn2ZzS7nidp+aaFSJk1yTjus SQfQ== 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 q30-20020a056402249e00b004856bba2c8fsi23279549eda.514.2023.01.04.13.11.36; Wed, 04 Jan 2023 13:12:00 -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 S240288AbjADVGk (ORCPT + 99 others); Wed, 4 Jan 2023 16:06:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240304AbjADVGU (ORCPT ); Wed, 4 Jan 2023 16:06:20 -0500 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50BD01CB12 for ; Wed, 4 Jan 2023 13:06:19 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id DAxcpwWwVxN58DAxlpFlJL; Wed, 04 Jan 2023 22:06:17 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 04 Jan 2023 22:06:17 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, Christophe JAILLET Subject: [PATCH net-next 1/3] ezchip: Remove some redundant clean-up functions Date: Wed, 4 Jan 2023 22:05:32 +0100 Message-Id: <43e9d047a036cd8a84aad8e9fffdfdcb17a1cf2a.1672865629.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754127894278763376?= X-GMAIL-MSGID: =?utf-8?q?1754127894278763376?= free_netdev() already calls netif_napi_del(), no need to call it explicitly. It's harmless, but useless. Remove the call in the error handling path of the probe and in the remove function. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/ezchip/nps_enet.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c index f1eb660aaee2..6389c6b5005c 100644 --- a/drivers/net/ethernet/ezchip/nps_enet.c +++ b/drivers/net/ethernet/ezchip/nps_enet.c @@ -627,7 +627,6 @@ static s32 nps_enet_probe(struct platform_device *pdev) return 0; out_netif_api: - netif_napi_del(&priv->napi); out_netdev: free_netdev(ndev); @@ -640,7 +639,6 @@ static s32 nps_enet_remove(struct platform_device *pdev) struct nps_enet_priv *priv = netdev_priv(ndev); unregister_netdev(ndev); - netif_napi_del(&priv->napi); free_netdev(ndev); return 0;