Browse Source

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 <gregkh@linuxfoundation.org>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick 11 years ago
parent
commit
fbc470d66d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c

+ 1 - 2
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);
 }