mac80211: fix possible NULL pointer dereference in ath9k

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34624
This commit is contained in:
Gabor Juhos 2012-12-10 23:21:02 +00:00
parent aa2dc106c6
commit 51f59a4f53

View file

@ -144,7 +144,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
ath_read_cachesize(common, &csz);
common->cachelsz = csz << 2; /* convert to bytes */
+ if (pdata->eeprom_name) {
+ if (pdata && pdata->eeprom_name) {
+ ret = ath9k_eeprom_request(sc, pdata->eeprom_name);
+ if (ret)
+ goto err_eeprom;