Skip to content

Commit 0d44b41

Browse files
elfringdvhart
authored andcommitted
tc1100-wmi: Delete an unnecessary check before the function call "kfree"
The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Darren Hart <[email protected]>
1 parent b8830a4 commit 0d44b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/tc1100-wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static int get_state(u32 *out, u8 instance)
8282
tmp = 0;
8383
}
8484

85-
if (result.length > 0 && result.pointer)
85+
if (result.length > 0)
8686
kfree(result.pointer);
8787

8888
switch (instance) {

0 commit comments

Comments
 (0)