mac80211: fix possible NULL pointer dereference in ath9k
[openwrt.git] / package / mac80211 / patches / 305-pending-ath9k-allow-to-load-EEPROM-content-via-firmware-API.patch
index 78efdc4..d710d09 100644 (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;