Skip to content
Commit a055b3cb authored by Tapasweni Pathak's avatar Tapasweni Pathak Committed by Greg Kroah-Hartman
Browse files

staging: rtl8188eu: core: Remove null check before kfree



kfree on NULL pointer is a no-op.

This patch uses the following semantic patch to find such an instance
where NULL check is present before kfree.

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Build tested it.

Signed-off-by: default avatarTapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ede7af3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment