net: dsa: ocelot: remove unnecessary set_drvdata()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 21 Sep 2022 14:05:17 +0000 (22:05 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Sep 2022 02:30:38 +0000 (19:30 -0700)
Remove unnecessary set_drvdata(NULL) function in ->remove(),
the driver_data will be set to NULL in device_unbind_cleanup()
after calling ->remove().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c

index 459288d6222c2aaab4a7f91ad631b7895c909357..2ec49e42b3f42886619b880558c62ba75644a265 100644 (file)
@@ -2727,8 +2727,6 @@ static void felix_pci_remove(struct pci_dev *pdev)
        kfree(felix);
 
        pci_disable_device(pdev);
-
-       pci_set_drvdata(pdev, NULL);
 }
 
 static void felix_pci_shutdown(struct pci_dev *pdev)
index 3ce1cd1a8d4ac2eed3069979150c420e52b13a18..5b29fa9306274bfb73fa358938bbde9ee63f7946 100644 (file)
@@ -1153,8 +1153,6 @@ static int seville_remove(struct platform_device *pdev)
        kfree(felix->ds);
        kfree(felix);
 
-       platform_set_drvdata(pdev, NULL);
-
        return 0;
 }