projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8857d6d
)
rt2800: do not crash if spec->channels is NULL
author
Stanislaw Gruszka
<stf_xl@wp.pl>
Sat, 16 Mar 2013 18:19:29 +0000
(19:19 +0100)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 18 Mar 2013 20:38:29 +0000
(16:38 -0400)
In case the spec->channels was not specified, print warning instead
of hard crash the kernel.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/rt2x00/rt2800lib.c
b/drivers/net/wireless/rt2x00/rt2800lib.c
index a658b4bc7da2fea78f2160b97907f20d547abde5..182e598017ec221bb5fac9a6c1ff422cbd52e17e 100644
(file)
--- a/
drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/
drivers/net/wireless/rt2x00/rt2800lib.c
@@
-5213,6
+5213,9
@@
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
spec->channels = rf_vals_3x;
}
+ if (WARN_ON_ONCE(!spec->channels))
+ return -ENODEV;
+
/*
* Initialize HT information.
*/