Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35290
b: refs/heads/master
c: dca762d
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Sep 11, 2006
1 parent bd37302 commit dce7c00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87d263271b1bbf344c596ac308417ff692ddc851
refs/heads/master: dca762d63a6fd62599f0d5d18525fa347fa1772a
12 changes: 3 additions & 9 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev,
char *buf)
{
struct bcm43xx_private *bcm = dev_to_bcm(dev);
int err;
ssize_t count = 0;

if (!capable(CAP_NET_ADMIN))
Expand All @@ -197,11 +196,10 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev,
default:
assert(0);
}
err = 0;

mutex_unlock(&bcm->mutex);

return err ? err : count;
return count;

}

Expand Down Expand Up @@ -259,7 +257,6 @@ static ssize_t bcm43xx_attr_preamble_show(struct device *dev,
char *buf)
{
struct bcm43xx_private *bcm = dev_to_bcm(dev);
int err;
ssize_t count;

if (!capable(CAP_NET_ADMIN))
Expand All @@ -272,10 +269,9 @@ static ssize_t bcm43xx_attr_preamble_show(struct device *dev,
else
count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble disabled)\n");

err = 0;
mutex_unlock(&bcm->mutex);

return err ? err : count;
return count;
}

static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
Expand All @@ -284,7 +280,6 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
{
struct bcm43xx_private *bcm = dev_to_bcm(dev);
unsigned long flags;
int err;
int value;

if (!capable(CAP_NET_ADMIN))
Expand All @@ -298,11 +293,10 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev,

bcm->short_preamble = !!value;

err = 0;
spin_unlock_irqrestore(&bcm->irq_lock, flags);
mutex_unlock(&bcm->mutex);

return err ? err : count;
return count;
}

static DEVICE_ATTR(shortpreamble, 0644,
Expand Down

0 comments on commit dce7c00

Please sign in to comment.