]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath5k: remove redundant null check before kfree()
authorBob Copeland <me@bobcopeland.com>
Fri, 22 Aug 2014 13:18:02 +0000 (09:18 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 28 Aug 2014 18:41:57 +0000 (14:41 -0400)
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>
drivers/net/wireless/ath/ath5k/attach.c

index 7106547a14ddc6819751b48041540ab3846e7f68..66b6366158b90a92054dbb9ce5cd97a665abc65c 100644 (file)
@@ -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);