From: Jingoo Han Date: Tue, 10 Sep 2013 11:10:35 +0000 (+0900) Subject: can: pch_can: remove unnecessary pci_set_drvdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa86858c356beb72af86107612ac854c0150d6db;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git can: pch_can: remove unnecessary pci_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c index 5c314a961970..5f0e9b3bfa7b 100644 --- a/drivers/net/can/pch_can.c +++ b/drivers/net/can/pch_can.c @@ -964,7 +964,6 @@ static void pch_can_remove(struct pci_dev *pdev) pci_disable_msi(priv->dev); pci_release_regions(pdev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); pch_can_reset(priv); pci_iounmap(pdev, priv->regs); free_candev(priv->ndev);