]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drivers/net/acenic.c: fix check-after-use
authorAdrian Bunk <bunk@stusta.de>
Mon, 23 Jul 2007 08:02:32 +0000 (10:02 +0200)
committerJeff Garzik <jeff@garzik.org>
Tue, 24 Jul 2007 20:28:41 +0000 (16:28 -0400)
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@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/acenic.c

index b78a4e5ceeb2825889439a7be1f7969767d7c311..62e660a79387e92fbaabd7edd8d84b508ee841db 100644 (file)
@@ -3128,12 +3128,6 @@ static int __devinit read_eeprom_byte(struct net_device *dev,
        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