diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-10 07:08:15 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-09-21 09:43:15 -0400 |
commit | 5fabc336fead7d62b22b1a59e45efd7adc5d2ea7 (patch) | |
tree | 89a1a4322d0d4da5e816d4307a22009c25422101 | |
parent | fc218471c69edd43c34d304cd737f0958d8ce195 (diff) |
can: c_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 <jg1.han@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/c_can/c_can_pci.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c index b374be7891a2..bce0be54c2f5 100644 --- a/drivers/net/can/c_can/c_can_pci.c +++ b/drivers/net/can/c_can/c_can_pci.c | |||
@@ -160,7 +160,6 @@ static int c_can_pci_probe(struct pci_dev *pdev, | |||
160 | return 0; | 160 | return 0; |
161 | 161 | ||
162 | out_free_c_can: | 162 | out_free_c_can: |
163 | pci_set_drvdata(pdev, NULL); | ||
164 | free_c_can_dev(dev); | 163 | free_c_can_dev(dev); |
165 | out_iounmap: | 164 | out_iounmap: |
166 | pci_iounmap(pdev, addr); | 165 | pci_iounmap(pdev, addr); |
@@ -181,7 +180,6 @@ static void c_can_pci_remove(struct pci_dev *pdev) | |||
181 | 180 | ||
182 | unregister_c_can_dev(dev); | 181 | unregister_c_can_dev(dev); |
183 | 182 | ||
184 | pci_set_drvdata(pdev, NULL); | ||
185 | free_c_can_dev(dev); | 183 | free_c_can_dev(dev); |
186 | 184 | ||
187 | pci_iounmap(pdev, priv->base); | 185 | pci_iounmap(pdev, priv->base); |