Skip to content

Commit

Permalink
drivers/net/ns83820.c: fix a check-after-use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Jeff Garzik committed Jul 2, 2007
1 parent afaee82 commit d14e37e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ns83820.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d14e37e

Please sign in to comment.