Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188004
b: refs/heads/master
c: 51f5f8c
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and John W. Linville committed Mar 10, 2010
1 parent c1944fd commit c621157
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 2a13052fe495948e572839e514e0e0cd236c50b0
refs/heads/master: 51f5f8ca446d4c59041b9b6995821e13208897ea
10 changes: 7 additions & 3 deletions trunk/net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,24 @@ static ssize_t ieee80211_if_write(
ssize_t (*write)(struct ieee80211_sub_if_data *, const char *, int))
{
u8 *buf;
ssize_t ret = -ENODEV;
ssize_t ret;

buf = kzalloc(count, GFP_KERNEL);
buf = kmalloc(count, GFP_KERNEL);
if (!buf)
return -ENOMEM;

ret = -EFAULT;
if (copy_from_user(buf, userbuf, count))
return -EFAULT;
goto freebuf;

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 c621157

Please sign in to comment.