[KJ] [Patch] remove dead code in bcm43xx_sysfs.c

Darren Jenkins\ darrenrjenkins at gmail.com
Thu Sep 7 00:27:39 PDT 2006


G'day people,

Coverity CID 1161

This is probably fixed in some external tree, but in case it isn't, here is a patch


Compile tested with allyesconfig


Remove some dead code from bcm43xx_sysfs.c in 2.6.18-rc6

Signed-off-by: Darren Jenkins <darrenrjenkins at gmail.com>
--- drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c.orig	2006-09-07 15:40:33.000000000 +1000
+++ drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c	2006-09-07 15:42:02.000000000 +1000
@@ -276,7 +276,6 @@ static ssize_t bcm43xx_attr_preamble_sto
 {
 	struct bcm43xx_private *bcm = dev_to_bcm(dev);
 	unsigned long flags;
-	int err;
 	int value;
 
 	if (!capable(CAP_NET_ADMIN))
@@ -289,10 +288,9 @@ static ssize_t bcm43xx_attr_preamble_sto
 
 	bcm->short_preamble = !!value;
 
-	err = 0;
 	bcm43xx_unlock_irqsafe(bcm, flags);
 
-	return err ? err : count;
+	return count;
 }
 
 static DEVICE_ATTR(shortpreamble, 0644,





More information about the Kernel-janitors mailing list