summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChoi, Jong-Hwan <jhbird.choi@samsung.com>2011-07-15 10:56:25 +0900
committerDmitry Shmidt <dimitrysh@google.com>2011-07-21 17:10:25 -0700
commitb06f3b5edb8f9256f0435f13a439074291cd9055 (patch)
treef7afb9f6a0575245211dfe623a78e9698e7f2796
parentadf0760ceb775202fe7838c21eede5788f2ac31d (diff)
net: wireless: bcm4329: fix array subscript is below array bounds
Change-Id: I5d521895070d255f7ac0c9eaf262ec9f4cdd2f8a Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>
-rw-r--r--drivers/net/wireless/bcm4329/dhd_linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_linux.c b/drivers/net/wireless/bcm4329/dhd_linux.c
index c2d6587f30a..5c1384bdc21 100644
--- a/drivers/net/wireless/bcm4329/dhd_linux.c
+++ b/drivers/net/wireless/bcm4329/dhd_linux.c
@@ -1941,6 +1941,9 @@ dhd_open(struct net_device *net)
ifidx = dhd_net2idx(dhd, net);
DHD_TRACE(("%s: ifidx %d\n", __FUNCTION__, ifidx));
+ if (ifidx == DHD_BAD_IF)
+ return -1;
+
if ((dhd->iflist[ifidx]) && (dhd->iflist[ifidx]->state == WLC_E_IF_DEL)) {
DHD_ERROR(("%s: Error: called when IF already deleted\n", __FUNCTION__));
return -1;