提交 d14e37e1 编写于 作者: A Adrian Bunk 提交者: Jeff Garzik

drivers/net/ns83820.c: fix a check-after-use

This patch fixes a check-after-use spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 afaee82c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册