Skip to content

Commit

Permalink
ipmi: Delete an unnecessary check before the function call "cleanup_o…
Browse files Browse the repository at this point in the history
…ne_si"

The cleanup_one_si() 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: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
Markus Elfring authored and Corey Minyard committed Sep 3, 2015
1 parent fedb25e commit a793089
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2775,9 +2775,7 @@ static int ipmi_remove(struct platform_device *dev)
{
struct smi_info *info = dev_get_drvdata(&dev->dev);

if (info)
cleanup_one_si(info);

cleanup_one_si(info);
return 0;
}

Expand Down

0 comments on commit a793089

Please sign in to comment.