Staging: rtl8723bs: Do not check for NOT NULL before kfree()
authorShreeya Patel <shreeya.patel23498@gmail.com>
Tue, 19 Dec 2017 19:07:45 +0000 (00:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Dec 2017 17:22:07 +0000 (18:22 +0100)
commit37edc1ccc9e1b61cbcfa8cc6bab463cba397bbe2
treeceba517fd390bde53629b088e0265add788015dc
parent16e1b4ebfbc27a15fabaad64a2d3344360654c9c
Staging: rtl8723bs: Do not check for NOT NULL before kfree()

Do not check for NOT NULL before calling kfree because
if the pointer is NULL, no action occurs.
Done using the following semantic patch by coccinelle.

@@
expression ptr;
@@

- if (ptr != NULL)
  kfree(ptr);

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c