diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-07-01 22:21:10 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-02 14:24:52 +0200 |
commit | d14e37e12087e98b63907518dff83a90297605d6 (patch) | |
tree | 1e089beb7c8c4557956c463b75c33a79de57939b /drivers/net/ns83820.c | |
parent | net/usb/cdc_ether minor sparse cleanup (diff) | |
download | linux-d14e37e12087e98b63907518dff83a90297605d6.tar.xz linux-d14e37e12087e98b63907518dff83a90297605d6.zip |
drivers/net/ns83820.c: fix a check-after-use
This patch fixes a check-after-use spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 717d8e9b9833..104aab3c957f 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c @@ -1831,11 +1831,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ndev = alloc_etherdev(sizeof(struct ns83820)); dev = PRIV(ndev); - dev->ndev = ndev; + err = -ENOMEM; if (!dev) goto out; + dev->ndev = ndev; + spin_lock_init(&dev->rx_info.lock); spin_lock_init(&dev->tx_lock); spin_lock_init(&dev->misc_lock); |