From 5b1186350d67a7e1a2394de4df3fc937cd1ea3b8 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Mon, 1 Aug 2011 15:40:01 -0700 Subject: [PATCH] net: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcmdhd/wldev_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/bcmdhd/wldev_common.c b/drivers/net/wireless/bcmdhd/wldev_common.c index 31e8f3cb86fd..429cd2c451e4 100644 --- a/drivers/net/wireless/bcmdhd/wldev_common.c +++ b/drivers/net/wireless/bcmdhd/wldev_common.c @@ -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; -- 2.34.1