[PATCH] can: ctucanfd: Remove a useless netif_napi_del() call

From: Christophe JAILLET
Date: Thu May 18 2023 - 03:10:55 EST


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@xxxxxxxxxx>
---
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