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 459288d..2ec49e4 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 3ce1cd1..5b29fa9 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;
 }