Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d14e37e12087e98b63907518dff83a90297605d6 Commit: d14e37e12087e98b63907518dff83a90297605d6 Parent: afaee82c0aef7c2b30acff129c723031343e10c2 Author: Adrian Bunk <[EMAIL PROTECTED]> AuthorDate: Sun Jul 1 22:21:10 2007 +0200 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Mon Jul 2 08:24:52 2007 -0400
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 <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- 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 717d8e9..104aab3 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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html