ath9k: remove unnecessary code
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 9 May 2017 13:04:30 +0000 (08:04 -0500)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 19 May 2017 07:57:55 +0000 (10:57 +0300)
The array field eeprom_data in struct th9k_platform_data
is a fixed size array so it can never be NULL.

Addresses-Coverity-ID: 1364903
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/eeprom.c

index 6ccf248145141db26f931d83b1a8327d656b516f..6fbd5559c0c09a79c2e6bdbba4dbdfe0976269f9 100644 (file)
@@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
 
        if (ah->eeprom_blob)
                ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
-       else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
+       else if (pdata && !pdata->use_eeprom)
                ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
        else
                ret = common->bus_ops->eeprom_read(common, off, data);