net: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 1 Aug 2011 22:40:01 +0000 (15:40 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:22:21 +0000 (12:22 -0800)
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;