aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-11-24 21:16:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-08 20:04:40 -0500
commitf166b4981472baa9af2ae29984ea08e0eb62ca6c (patch)
tree0732cf6af824c6aae2f4dd13d5517e6db72dbd03
parent9cfb5e30951e484a403793d67d9ba0e2d4a188fd (diff)
parport_serial: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/parport/parport_serial.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 1b8bdb7e9bf4..ff53314100f6 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -596,13 +596,11 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
596 596
597 err = pci_enable_device (dev); 597 err = pci_enable_device (dev);
598 if (err) { 598 if (err) {
599 pci_set_drvdata (dev, NULL);
600 kfree (priv); 599 kfree (priv);
601 return err; 600 return err;
602 } 601 }
603 602
604 if (parport_register (dev, id)) { 603 if (parport_register (dev, id)) {
605 pci_set_drvdata (dev, NULL);
606 kfree (priv); 604 kfree (priv);
607 return -ENODEV; 605 return -ENODEV;
608 } 606 }
@@ -611,7 +609,6 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
611 int i; 609 int i;
612 for (i = 0; i < priv->num_par; i++) 610 for (i = 0; i < priv->num_par; i++)
613 parport_pc_unregister_port (priv->port[i]); 611 parport_pc_unregister_port (priv->port[i]);
614 pci_set_drvdata (dev, NULL);
615 kfree (priv); 612 kfree (priv);
616 return -ENODEV; 613 return -ENODEV;
617 } 614 }
@@ -624,8 +621,6 @@ static void parport_serial_pci_remove(struct pci_dev *dev)
624 struct parport_serial_private *priv = pci_get_drvdata (dev); 621 struct parport_serial_private *priv = pci_get_drvdata (dev);
625 int i; 622 int i;
626 623
627 pci_set_drvdata(dev, NULL);
628
629 // Serial ports 624 // Serial ports
630 if (priv->serial) 625 if (priv->serial)
631 pciserial_remove_ports(priv->serial); 626 pciserial_remove_ports(priv->serial);