Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291536
b: refs/heads/master
c: ada577c
h: refs/heads/master
v: v3
  • Loading branch information
Eliad Peller authored and John W. Linville committed Mar 15, 2012
1 parent 37c2510 commit 3d55a7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: ba6fa29c6dd51a1245a109f4b460092b51cad0f0
refs/heads/master: ada577c12f7cd8851c999a9f19f62df06df7c39a
13 changes: 5 additions & 8 deletions trunk/net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,22 @@ static ssize_t ieee80211_if_write(
size_t count, loff_t *ppos,
ssize_t (*write)(struct ieee80211_sub_if_data *, const char *, int))
{
u8 *buf;
char buf[64];
ssize_t ret;

buf = kmalloc(count, GFP_KERNEL);
if (!buf)
return -ENOMEM;
if (count >= sizeof(buf))
return -E2BIG;

ret = -EFAULT;
if (copy_from_user(buf, userbuf, count))
goto freebuf;
return -EFAULT;
buf[count] = '\0';

ret = -ENODEV;
rtnl_lock();
if (sdata->dev->reg_state == NETREG_REGISTERED)
ret = (*write)(sdata, buf, count);
rtnl_unlock();

freebuf:
kfree(buf);
return ret;
}

Expand Down

0 comments on commit 3d55a7f

Please sign in to comment.