projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36165fd
)
drivers: net: wireless: b43: Fix possible NULL ptr dereference
author
Felipe Pena
<felipensp@gmail.com>
Thu, 17 Oct 2013 00:40:24 +0000
(21:40 -0300)
committer
John W. Linville
<linville@tuxdriver.com>
Fri, 18 Oct 2013 17:41:11 +0000
(13:41 -0400)
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>
drivers/net/wireless/b43/phy_n.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/wireless/b43/phy_n.c
b/drivers/net/wireless/b43/phy_n.c
index 7c970d3ae358834a4230f35826d6c598661ee323..05ee7f10cc8f577532e9180ac9874adcf9343d0f 100644
(file)
--- 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);