Ver código fonte

ath5k: remove redundant null check before kfree()

kfree() null-checks its argument.
Found by smatch.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland 11 anos atrás
pai
commit
dcb784050a
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      drivers/net/wireless/ath/ath5k/attach.c

+ 1 - 2
drivers/net/wireless/ath/ath5k/attach.c

@@ -351,8 +351,7 @@ void ath5k_hw_deinit(struct ath5k_hw *ah)
 {
 	__set_bit(ATH_STAT_INVALID, ah->status);
 
-	if (ah->ah_rf_banks != NULL)
-		kfree(ah->ah_rf_banks);
+	kfree(ah->ah_rf_banks);
 
 	ath5k_eeprom_detach(ah);