/* 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;
}
{
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;
}
}
/* 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;
}