diff options
author | Choi, Jong-Hwan <jhbird.choi@samsung.com> | 2011-10-09 02:30:16 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-09 02:30:16 +0100 |
commit | c89a3ad26423dcd9638a200e579edf382be5604c (patch) | |
tree | c772d752d8732179d6db2716746f2bf65e2015cb | |
parent | 8531b684598283763be750477ca1411ee1a29a60 (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.c | 3 |
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; |