mac80211: fix possible NULL pointer dereference in ath9k
authorGabor Juhos <juhosg@openwrt.org>
Mon, 10 Dec 2012 23:21:02 +0000 (23:21 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 10 Dec 2012 23:21:02 +0000 (23:21 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34624

package/mac80211/patches/305-pending-ath9k-allow-to-load-EEPROM-content-via-firmware-API.patch

index 78efdc4e371f160987f79efb6b6f4e2f883c03c7..d710d099ef35e89863c67f9f6bdef24458baa6cc 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;