ipmi: Delete an unnecessary check before the function call "cleanup_one_si"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 27 Jun 2015 16:12:14 +0000 (18:12 +0200)
committerCorey Minyard <cminyard@mvista.com>
Thu, 3 Sep 2015 20:02:25 +0000 (15:02 -0500)
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>
drivers/char/ipmi/ipmi_si_intf.c

index b1fdbf78da9bcaac26172e7a8bfab963695ebb2d..4387bd6de2cae470c370489700bce05a8f76f382 100644 (file)
@@ -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;
 }