From: Jingoo Han Date: Thu, 12 Sep 2013 06:43:07 +0000 (+0900) Subject: mfd: sm501: Remove unnecessary pci_set_drvdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=928dfb2c750da3e1db181742198da4d9026012b0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mfd: sm501: 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: Lee Jones --- diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c index 3799a3d64415..c2c8c91c6c7b 100644 --- a/drivers/mfd/sm501.c +++ b/drivers/mfd/sm501.c @@ -1660,7 +1660,6 @@ static int sm501_pci_probe(struct pci_dev *dev, err3: pci_disable_device(dev); err2: - pci_set_drvdata(dev, NULL); kfree(sm); err1: return err; @@ -1695,7 +1694,6 @@ static void sm501_pci_remove(struct pci_dev *dev) release_resource(sm->regs_claim); kfree(sm->regs_claim); - pci_set_drvdata(dev, NULL); pci_disable_device(dev); }