]> git.karo-electronics.de Git - linux-beck.git/commitdiff
parport_serial: remove unnecessary pci_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 25 Nov 2013 02:16:33 +0000 (11:16 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 01:04:40 +0000 (17:04 -0800)
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>
drivers/parport/parport_serial.c

index 1b8bdb7e9bf40a6549c5739e6d8a50a732bc9cd9..ff53314100f684ed9dcb86a9a89ea3f12b6a24e6 100644 (file)
@@ -596,13 +596,11 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
 
        err = pci_enable_device (dev);
        if (err) {
-               pci_set_drvdata (dev, NULL);
                kfree (priv);
                return err;
        }
 
        if (parport_register (dev, id)) {
-               pci_set_drvdata (dev, NULL);
                kfree (priv);
                return -ENODEV;
        }
@@ -611,7 +609,6 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
                int i;
                for (i = 0; i < priv->num_par; i++)
                        parport_pc_unregister_port (priv->port[i]);
-               pci_set_drvdata (dev, NULL);
                kfree (priv);
                return -ENODEV;
        }
@@ -624,8 +621,6 @@ static void parport_serial_pci_remove(struct pci_dev *dev)
        struct parport_serial_private *priv = pci_get_drvdata (dev);
        int i;
 
-       pci_set_drvdata(dev, NULL);
-
        // Serial ports
        if (priv->serial)
                pciserial_remove_ports(priv->serial);