]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8723bs: hal: Remove NULL check before kfree
authorSimran Singhal <singhalsimran0@gmail.com>
Thu, 26 Mar 2020 13:28:23 +0000 (18:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2020 14:47:26 +0000 (15:47 +0100)
commit96e8fc6df0f64e07870960b5ae0e73842b4dcc16
treec449136411bd2e4a503d1fbe86324c174c8d9e5f
parent713c58b0f3b61a304d9df1bf7ab798559fa837c3
staging: rtl8723bs: hal: Remove NULL check before kfree

NULL check before kfree is unnecessary so remove it.

The following Coccinelle script was used to detect this:
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200326132823.GA18625@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c