mac80211: fix possible NULL pointer dereference in ath9k
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 10 Dec 2012 23:21:02 +0000 (23:21 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 10 Dec 2012 23:21:02 +0000 (23:21 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34624 3c298f89-4303-0410-b956-a3cf2f4a3e73

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;