mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 04:41:26 +00:00
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>
This commit is contained in:
parent
afaee82c0a
commit
d14e37e120
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user