aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2006-09-07 12:17:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-09-11 19:34:03 -0400
commitdca762d63a6fd62599f0d5d18525fa347fa1772a (patch)
tree1c619558db1a846fc318134caa4792d945e41cf1 /drivers/net/wireless
parent87d263271b1bbf344c596ac308417ff692ddc851 (diff)
[PATCH] bcm43xx: remove dead code in bcm43xx_sysfs.c
Coverity CID 1160 & 1161 Remove some dead code from bcm43xx_sysfs.c in 2.6.18-rc6 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
index b2bc5a9b6245..c71b998a3694 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
@@ -176,7 +176,6 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev,
176 char *buf) 176 char *buf)
177{ 177{
178 struct bcm43xx_private *bcm = dev_to_bcm(dev); 178 struct bcm43xx_private *bcm = dev_to_bcm(dev);
179 int err;
180 ssize_t count = 0; 179 ssize_t count = 0;
181 180
182 if (!capable(CAP_NET_ADMIN)) 181 if (!capable(CAP_NET_ADMIN))
@@ -197,11 +196,10 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev,
197 default: 196 default:
198 assert(0); 197 assert(0);
199 } 198 }
200 err = 0;
201 199
202 mutex_unlock(&bcm->mutex); 200 mutex_unlock(&bcm->mutex);
203 201
204 return err ? err : count; 202 return count;
205 203
206} 204}
207 205
@@ -259,7 +257,6 @@ static ssize_t bcm43xx_attr_preamble_show(struct device *dev,
259 char *buf) 257 char *buf)
260{ 258{
261 struct bcm43xx_private *bcm = dev_to_bcm(dev); 259 struct bcm43xx_private *bcm = dev_to_bcm(dev);
262 int err;
263 ssize_t count; 260 ssize_t count;
264 261
265 if (!capable(CAP_NET_ADMIN)) 262 if (!capable(CAP_NET_ADMIN))
@@ -272,10 +269,9 @@ static ssize_t bcm43xx_attr_preamble_show(struct device *dev,
272 else 269 else
273 count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble disabled)\n"); 270 count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble disabled)\n");
274 271
275 err = 0;
276 mutex_unlock(&bcm->mutex); 272 mutex_unlock(&bcm->mutex);
277 273
278 return err ? err : count; 274 return count;
279} 275}
280 276
281static ssize_t bcm43xx_attr_preamble_store(struct device *dev, 277static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
@@ -284,7 +280,6 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
284{ 280{
285 struct bcm43xx_private *bcm = dev_to_bcm(dev); 281 struct bcm43xx_private *bcm = dev_to_bcm(dev);
286 unsigned long flags; 282 unsigned long flags;
287 int err;
288 int value; 283 int value;
289 284
290 if (!capable(CAP_NET_ADMIN)) 285 if (!capable(CAP_NET_ADMIN))
@@ -298,11 +293,10 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
298 293
299 bcm->short_preamble = !!value; 294 bcm->short_preamble = !!value;
300 295
301 err = 0;
302 spin_unlock_irqrestore(&bcm->irq_lock, flags); 296 spin_unlock_irqrestore(&bcm->irq_lock, flags);
303 mutex_unlock(&bcm->mutex); 297 mutex_unlock(&bcm->mutex);
304 298
305 return err ? err : count; 299 return count;
306} 300}
307 301
308static DEVICE_ATTR(shortpreamble, 0644, 302static DEVICE_ATTR(shortpreamble, 0644,