netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ath9k: remove unnecessary code
@ 2017-05-09 13:04 Gustavo A. R. Silva
  2017-05-19  7:58 ` [v2] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-09 13:04 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva,
	Arend Van Spriel

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>
---
Changes in v2:
 Rephrase commit log.

 drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index fb80ec8..5c3bc28 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -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);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v2] ath9k: remove unnecessary code
  2017-05-09 13:04 [PATCH v2] ath9k: remove unnecessary code Gustavo A. R. Silva
@ 2017-05-19  7:58 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-05-19  7:58 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva,
	Arend Van Spriel

"Gustavo A. R. Silva" <garsilva@embeddedor.com> wrote:
> 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>

Patch applied to ath-next branch of ath.git, thanks.

641c1f4ab7f6 ath9k: remove unnecessary code

-- 
https://patchwork.kernel.org/patch/9717873/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-19  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-09 13:04 [PATCH v2] ath9k: remove unnecessary code Gustavo A. R. Silva
2017-05-19  7:58 ` [v2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).