Skip to content

Commit

Permalink
can: xilinx_can: xcan_remove(): remove redundant netif_napi_del()
Browse files Browse the repository at this point in the history
Since netif_napi_del() is already done in the free_candev(), we remove
this redundant netif_napi_del() invocation. In addition, this patch
can match the operations in the xcan_probe() and xcan_remove()
functions.

Link: https://lore.kernel.org/all/20211017125022.3100329-1-mudongliangabcd@gmail.com
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Dongliang Mu authored and Marc Kleine-Budde committed Oct 24, 2021
1 parent c926039 commit b9b8218
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/can/xilinx_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,11 +1843,9 @@ static int xcan_probe(struct platform_device *pdev)
static int xcan_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct xcan_priv *priv = netdev_priv(ndev);

unregister_candev(ndev);
pm_runtime_disable(&pdev->dev);
netif_napi_del(&priv->napi);
free_candev(ndev);

return 0;
Expand Down

0 comments on commit b9b8218

Please sign in to comment.