diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-08-03 15:24:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 16:44:31 -0400 |
commit | 39a21951efc99e040a7d66449f63910e439b97e9 (patch) | |
tree | 256a745adfe0472fc6cca32fed48ebec3800cecd /drivers | |
parent | 1e40bcfa91429edb665af9ffefb2658350913d35 (diff) |
ath9k: remove !NULL check before kfree()
kfree(NULL) works so remove all those branches which check
for it before kfree()'ing on ath9k_hw_rfdetach().
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/phy.c | 62 |
1 files changed, 26 insertions, 36 deletions
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c index aaa941561c36..06fd057e467b 100644 --- a/drivers/net/wireless/ath/ath9k/phy.c +++ b/drivers/net/wireless/ath/ath9k/phy.c | |||
@@ -266,42 +266,32 @@ ath9k_hw_set_rf_regs(struct ath_hw *ah, struct ath9k_channel *chan, | |||
266 | void | 266 | void |
267 | ath9k_hw_rfdetach(struct ath_hw *ah) | 267 | ath9k_hw_rfdetach(struct ath_hw *ah) |
268 | { | 268 | { |
269 | if (ah->analogBank0Data != NULL) { | 269 | kfree(ah->analogBank0Data); |
270 | kfree(ah->analogBank0Data); | 270 | ah->analogBank0Data = NULL; |
271 | ah->analogBank0Data = NULL; | 271 | |
272 | } | 272 | kfree(ah->analogBank1Data); |
273 | if (ah->analogBank1Data != NULL) { | 273 | ah->analogBank1Data = NULL; |
274 | kfree(ah->analogBank1Data); | 274 | |
275 | ah->analogBank1Data = NULL; | 275 | kfree(ah->analogBank2Data); |
276 | } | 276 | ah->analogBank2Data = NULL; |
277 | if (ah->analogBank2Data != NULL) { | 277 | |
278 | kfree(ah->analogBank2Data); | 278 | kfree(ah->analogBank3Data); |
279 | ah->analogBank2Data = NULL; | 279 | ah->analogBank3Data = NULL; |
280 | } | 280 | |
281 | if (ah->analogBank3Data != NULL) { | 281 | kfree(ah->analogBank6Data); |
282 | kfree(ah->analogBank3Data); | 282 | ah->analogBank6Data = NULL; |
283 | ah->analogBank3Data = NULL; | 283 | |
284 | } | 284 | kfree(ah->analogBank6TPCData); |
285 | if (ah->analogBank6Data != NULL) { | 285 | ah->analogBank6TPCData = NULL; |
286 | kfree(ah->analogBank6Data); | 286 | |
287 | ah->analogBank6Data = NULL; | 287 | kfree(ah->analogBank7Data); |
288 | } | 288 | ah->analogBank7Data = NULL; |
289 | if (ah->analogBank6TPCData != NULL) { | 289 | |
290 | kfree(ah->analogBank6TPCData); | 290 | kfree(ah->addac5416_21); |
291 | ah->analogBank6TPCData = NULL; | 291 | ah->addac5416_21 = NULL; |
292 | } | 292 | |
293 | if (ah->analogBank7Data != NULL) { | 293 | kfree(ah->bank6Temp); |
294 | kfree(ah->analogBank7Data); | 294 | ah->bank6Temp = NULL; |
295 | ah->analogBank7Data = NULL; | ||
296 | } | ||
297 | if (ah->addac5416_21 != NULL) { | ||
298 | kfree(ah->addac5416_21); | ||
299 | ah->addac5416_21 = NULL; | ||
300 | } | ||
301 | if (ah->bank6Temp != NULL) { | ||
302 | kfree(ah->bank6Temp); | ||
303 | ah->bank6Temp = NULL; | ||
304 | } | ||
305 | } | 295 | } |
306 | 296 | ||
307 | bool ath9k_hw_init_rf(struct ath_hw *ah, int *status) | 297 | bool ath9k_hw_init_rf(struct ath_hw *ah, int *status) |