Skip to content

Commit

Permalink
tc1100-wmi: Delete an unnecessary check before the function call "kfree"
Browse files Browse the repository at this point in the history
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 <elfring@users.sourceforge.net>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
  • Loading branch information
Markus Elfring authored and Darren Hart committed Jun 26, 2015
1 parent b8830a4 commit 0d44b41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/tc1100-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int get_state(u32 *out, u8 instance)
tmp = 0;
}

if (result.length > 0 && result.pointer)
if (result.length > 0)
kfree(result.pointer);

switch (instance) {
Expand Down

0 comments on commit 0d44b41

Please sign in to comment.