mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] can: ctucanfd: Remove a useless netif_napi_del() call
@ 2023-05-18  7:10 Christophe JAILLET
  2023-05-18  7:32 ` Pavel Pisa
  2023-05-18 12:18 ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe JAILLET @ 2023-05-18  7:10 UTC (permalink / raw)
  To: Pavel Pisa, Ondrej Ille, Wolfgang Grandegger, Marc Kleine-Budde,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-can, netdev

free_candev() already calls netif_napi_del(), so there is no need to call
it explicitly. It is harmless, but useless.

This makes the code mode consistent with the error handling path of
ctucan_probe_common().

While at it, remove a wrong comment about the return value of this
function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
The comment went wrong after 45413bf75919 ("can: ctucanfd: Convert to platform remove callback returning void")
---
 drivers/net/can/ctucanfd/ctucanfd_platform.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c
index 55bb10b157b4..8fe224b8dac0 100644
--- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
+++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
@@ -84,7 +84,6 @@ static int ctucan_platform_probe(struct platform_device *pdev)
  * @pdev:	Handle to the platform device structure
  *
  * This function frees all the resources allocated to the device.
- * Return: 0 always
  */
 static void ctucan_platform_remove(struct platform_device *pdev)
 {
@@ -95,7 +94,6 @@ static void ctucan_platform_remove(struct platform_device *pdev)
 
 	unregister_candev(ndev);
 	pm_runtime_disable(&pdev->dev);
-	netif_napi_del(&priv->napi);
 	free_candev(ndev);
 }
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-18 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-18  7:10 [PATCH] can: ctucanfd: Remove a useless netif_napi_del() call Christophe JAILLET
2023-05-18  7:32 ` Pavel Pisa
2023-05-18  9:51   ` Marc Kleine-Budde
2023-05-18 12:18 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®