Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249286
b: refs/heads/master
c: 2c09ded
h: refs/heads/master
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed May 3, 2011
1 parent 000feae commit 490e474
Show file tree
Hide file tree
Showing 3 changed files with 7 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: b7ef2a9590479efc45e3acf3b193174da26aa561
refs/heads/master: 2c09ded5763751beb7fc7c2968480fa5cb21a219
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)

case DHD_GET_VERSION:
if (buflen < sizeof(int))
bcmerror = BCME_BUFTOOSHORT;
bcmerror = -BCME_BUFTOOSHORT;
else
*(int *)buf = DHD_IOCTL_VERSION;
break;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)

/* Copy the ioc control structure part of ioctl request */
if (copy_from_user(&ioc, ifr->ifr_data, sizeof(wl_ioctl_t))) {
bcmerror = BCME_BADADDR;
bcmerror = -BCME_BADADDR;
goto done;
}

Expand All @@ -1715,11 +1715,11 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
{
buf = kmalloc(buflen, GFP_ATOMIC);
if (!buf) {
bcmerror = BCME_NOMEM;
bcmerror = -BCME_NOMEM;
goto done;
}
if (copy_from_user(buf, ioc.buf, buflen)) {
bcmerror = BCME_BADADDR;
bcmerror = -BCME_BADADDR;
goto done;
}
}
Expand All @@ -1728,12 +1728,12 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
/* To differentiate between wl and dhd read 4 more byes */
if ((copy_from_user(&driver, (char *)ifr->ifr_data + sizeof(wl_ioctl_t),
sizeof(uint)) != 0)) {
bcmerror = BCME_BADADDR;
bcmerror = -BCME_BADADDR;
goto done;
}

if (!capable(CAP_NET_ADMIN)) {
bcmerror = BCME_EPERM;
bcmerror = -BCME_EPERM;
goto done;
}

Expand Down

0 comments on commit 490e474

Please sign in to comment.