From fbc470d66d68ddd33e156a59323f0d2a4dc82801 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Sat, 28 Jun 2014 13:22:59 +0200 Subject: [PATCH] drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c: remove unnecessary null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: Greg Kroah-Hartman Cc: Sarah Sharp Cc: devel@driverdev.osuosl.org Signed-off-by: Fabian Frederick Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c index 25e751b0962a..f885ca77344b 100644 --- a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c +++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c @@ -2045,8 +2045,7 @@ void rtl_8821ae_c2h_command_handle(struct ieee80211_hw *hw) break; } - if(ptmp_buf) - kfree(ptmp_buf); + kfree(ptmp_buf); rtl_write_byte(rtlpriv, 0x01AF, C2H_EVT_HOST_CLOSE); } -- 2.20.1