summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2013-10-16 21:40:24 -0300
committerJohn W. Linville <linville@tuxdriver.com>2013-10-18 13:41:11 -0400
commit8ce9beac4661f576ea0d518b9f086bb52a171a37 (patch)
tree17252a7e40d40f61ca82b138a4e47fbe0898a0c9 /drivers/net/wireless/b43
parent36165fd5b00bf8163f89c21bb16a3e9834555b10 (diff)
downloadtalos-op-linux-8ce9beac4661f576ea0d518b9f086bb52a171a37.tar.gz
talos-op-linux-8ce9beac4661f576ea0d518b9f086bb52a171a37.zip
drivers: net: wireless: b43: Fix possible NULL ptr dereference
On the ternary expression the 'e' variable could be NULL dereferenced, when b43_nphy_get_rf_ctl_over_rev7 function returns NULL. Signed-off-by: Felipe Pena <felipensp@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/phy_n.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 7c970d3ae358..05ee7f10cc8f 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -164,7 +164,8 @@ static void b43_nphy_rf_ctl_override_rev7(struct b43_wldev *dev, u16 field,
}
en_addr = en_addrs[override][i];
- val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1;
+ if (e)
+ val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1;
if (off) {
b43_phy_mask(dev, en_addr, ~en_mask);
OpenPOWER on IntegriCloud