[PATCH 1/1] drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c: remove unnecessary null test before kfree
From: Fabian Frederick
Date: Sat Jun 28 2014 - 07:24:34 EST
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
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 7b1d113..d8e05c8 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
@@ -2059,8 +2059,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);
}
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/