net: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter
Dmitry Shmidt [Mon, 1 Aug 2011 22:40:01 +0000 (15:40 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/wldev_common.c

index 31e8f3c..429cd2c 100644 (file)
@@ -47,6 +47,11 @@ s32 wldev_ioctl(
        mm_segment_t fs;
        s32 err = 0;
 
+       if (!dev) {
+               DHD_ERROR(("%s: dev is null\n", __FUNCTION__));
+               return -EINVAL;
+       }
+
        memset(&ioc, 0, sizeof(ioc));
        ioc.cmd = cmd;
        ioc.buf = arg;