mac80211: fix possible NULL pointer dereference in ath9k

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

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34624 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Gabor Juhos 2012-12-10 23:21:02 +00:00
parent 434f5b4a43
commit 515fa69f8f
1 changed files with 1 additions and 1 deletions

View File

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