lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070723080232.GF26212@stusta.de>
Date:	Mon, 23 Jul 2007 10:02:32 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	jes@...ined-monkey.org, Jeff Garzik <jeff@...zik.org>
Cc:	linux-acenic@...site.dk, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [2.6 patch] drivers/net/acenic.c: fix check-after-use

The Coverity checker noted that we've already dereferenced "dev" when we 
check whether it's NULL.

Since it's impossible that "dev" is NULL at this place this patch 
removes the NULL check.

Signed-off-by: Adrian Bunk <bunk@...sta.de>

---
--- linux-2.6.22-rc6-mm1/drivers/net/acenic.c.old	2007-07-23 04:06:05.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/net/acenic.c	2007-07-23 04:08:11.000000000 +0200
@@ -3124,20 +3124,14 @@ static int __devinit read_eeprom_byte(st
 	struct ace_private *ap = netdev_priv(dev);
 	struct ace_regs __iomem *regs = ap->regs;
 	unsigned long flags;
 	u32 local;
 	int result = 0;
 	short i;
 
-	if (!dev) {
-		printk(KERN_ERR "No device!\n");
-		result = -ENODEV;
-		goto out;
-	}
-
 	/*
 	 * Don't take interrupts on this CPU will bit banging
 	 * the %#%#@$ I2C device
 	 */
 	local_irq_save(flags);
 
 	eeprom_start(regs);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ