sis190: early setting of the pci driver private data
authorFrancois Romieu <romieu@electric-eye.fr.zoreil.com>
Thu, 16 Feb 2006 21:17:00 +0000 (22:17 +0100)
committerFrancois Romieu <romieu@electric-eye.fr.zoreil.com>
Thu, 16 Feb 2006 21:17:00 +0000 (22:17 +0100)
Below this point, the error path will proceed through
sis190_release_board(). It will happily oops if
pci_set_drvdata() has not been issued.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
drivers/net/sis190.c

index b420182eec4be6441c4b31b75f7763bb50610593..ed4bc91638d2083ff40be4deb882d8ed1a4d73e1 100644 (file)
@@ -1791,6 +1791,8 @@ static int __devinit sis190_init_one(struct pci_dev *pdev,
                goto out;
        }
 
+       pci_set_drvdata(pdev, dev);
+
        tp = netdev_priv(dev);
        ioaddr = tp->mmio_addr;
 
@@ -1827,8 +1829,6 @@ static int __devinit sis190_init_one(struct pci_dev *pdev,
        if (rc < 0)
                goto err_remove_mii;
 
-       pci_set_drvdata(pdev, dev);
-
        net_probe(tp, KERN_INFO "%s: %s at %p (IRQ: %d), "
               "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n",
               pci_name(pdev), sis_chip_info[ent->driver_data].name,