Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236903
b: refs/heads/master
c: 8e2de74
h: refs/heads/master
i:
  236901: b9d7df4
  236899: 2a70c25
  236895: d74924e
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Jan 24, 2011
1 parent 67190f7 commit d5a290b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: bbba3e6832ad3e974fb593a98abe03f8b60fc7f3
refs/heads/master: 8e2de74e781e696636e8b4cd08084d2b310d44d9
10 changes: 4 additions & 6 deletions trunk/drivers/net/wireless/wl12xx/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,27 +261,25 @@ static ssize_t gpio_power_write(struct file *file,
unsigned long value;
int ret;

mutex_lock(&wl->mutex);

len = min(count, sizeof(buf) - 1);
if (copy_from_user(buf, user_buf, len)) {
ret = -EFAULT;
goto out;
return -EFAULT;
}
buf[len] = '\0';

ret = strict_strtoul(buf, 0, &value);
if (ret < 0) {
wl1271_warning("illegal value in gpio_power");
goto out;
return -EINVAL;
}

mutex_lock(&wl->mutex);

if (value)
wl1271_power_on(wl);
else
wl1271_power_off(wl);

out:
mutex_unlock(&wl->mutex);
return count;
}
Expand Down

0 comments on commit d5a290b

Please sign in to comment.