Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4708617rwj; Tue, 20 Dec 2022 14:02:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJyasG2UUm7I8/QPgxJNXusCkpN0KHY2FeSW2btC1MflcXxgMa2nvdGViczi7kgeWORWQ6 X-Received: by 2002:a17:907:c606:b0:82d:1c3c:fe7c with SMTP id ud6-20020a170907c60600b0082d1c3cfe7cmr7211600ejc.22.1671573775984; Tue, 20 Dec 2022 14:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671573775; cv=none; d=google.com; s=arc-20160816; b=IVu8xbNgC0qhRkFvur5lY+U58fEWdm9/gYgCO1tDthldYcYOi33WG2wVdu8gZUO2YZ MomI5cOk0eZp6tHEWH3KczLpfj3atplXBbLVLmdiPNKXda7f7x3eBZD5VnPRyWaFtLxF ldAYXpvGUBS5E0TW4yPYhkPISuOVnFQ2wWRmqq5CUhs6oKa78RlEWDZmrb8A/7kippjr +EgYUTyYSeAjlIvbCbQMCPMC8CSOYQq6urizlEBkwtHi6f2mbuyqR+Co1BLNbOkKt8uu IGJOsWt0siAXh8L6gZlal0nRslDLg0+Ya8C17szgjuRNKjOoooWwWa7AcQOLd7giHgQH Skxg== 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=L5o94Pkhs8E3vT6Y1sb4BP5bXhCoj/siC/LlkaDTSE8=; b=xDjRpxIXRSU5PkX4RlZXhEpjnIxcf6ifKcTB1rWYIEQXW4EiguP0Vd+6MEdDbl0Wzt iy9SIgQ2qPz1kibfYW3psEnPp8SKGLdTax1IvXZDb5Rq63rDmS/Lk4QZCa/bwb1LIL3M QxPOeKggjjO80WG4MTj3TqdTi+mrFMJBzvhd8g6PID3Qq9pSj53QF5MHD38tPmGQXIch JmYX1QX8MpWYN/Yhpe5HNRwtcPPmTnP8PtcVqu+LLYIx7fwFUslHBw3TjTZ1igVUj/bq 41lZuu31S4ucx5XVibL3PZhLMKa7CRg+A5ecZfeqM8eWju1p5Kx74UQRfBxfNrRqfrfl IF7A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be11-20020a1709070a4b00b0078d93325645si12332472ejc.405.2022.12.20.14.02.39; Tue, 20 Dec 2022 14:02:55 -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 S234331AbiLTU5U (ORCPT + 68 others); Tue, 20 Dec 2022 15:57:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234288AbiLTU5O (ORCPT ); Tue, 20 Dec 2022 15:57:14 -0500 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AF2113DC8 for ; Tue, 20 Dec 2022 12:57:11 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 7jfgp6zGQPNsN7jfgpkyQP; Tue, 20 Dec 2022 21:57:09 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 20 Dec 2022 21:57:09 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Taku Izumi Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , netdev@vger.kernel.org Subject: [PATCH net] fjes: Fix an error handling path in fjes_probe() Date: Tue, 20 Dec 2022 21:57:06 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 A netif_napi_add() call is hidden in fjes_sw_init(). It should be undone by a corresponding netif_napi_del() call in the error handling path of the probe, as already done inthe remove function. Fixes: 265859309a76 ("fjes: NAPI polling function") Signed-off-by: Christophe JAILLET --- drivers/net/fjes/fjes_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 2513be6d4e11..01b4c9c6adbd 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -1370,7 +1370,7 @@ static int fjes_probe(struct platform_device *plat_dev) adapter->txrx_wq = alloc_workqueue(DRV_NAME "/txrx", WQ_MEM_RECLAIM, 0); if (unlikely(!adapter->txrx_wq)) { err = -ENOMEM; - goto err_free_netdev; + goto err_del_napi; } adapter->control_wq = alloc_workqueue(DRV_NAME "/control", @@ -1431,6 +1431,8 @@ static int fjes_probe(struct platform_device *plat_dev) destroy_workqueue(adapter->control_wq); err_free_txrx_wq: destroy_workqueue(adapter->txrx_wq); +err_del_napi: + netif_napi_del(&adapter->napi); err_free_netdev: free_netdev(netdev); err_out: -- 2.34.1