[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <001601ceaf83$56ead450$04c07cf0$%han@samsung.com>
Date: Thu, 12 Sep 2013 15:43:07 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Samuel Ortiz' <sameo@...ux.intel.com>,
'Lee Jones' <lee.jones@...aro.org>
Cc: linux-kernel@...r.kernel.org, 'Jingoo Han' <jg1.han@...sung.com>,
'Guenter Roeck' <linux@...ck-us.net>,
'Heiko Schocher' <hs@...x.de>
Subject: [PATCH 2/3] 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 <jg1.han@...sung.com>
---
drivers/mfd/sm501.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 3799a3d..c2c8c91 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);
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists