From: Markus Elfring Date: Sat, 27 Jun 2015 16:12:14 +0000 (+0200) Subject: ipmi: Delete an unnecessary check before the function call "cleanup_one_si" X-Git-Tag: v4.3-rc1~39^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7930899ca0082a33350b253c6ed34f67255f98e;p=thirdparty%2Fkernel%2Flinux.git ipmi: Delete an unnecessary check before the function call "cleanup_one_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 Signed-off-by: Corey Minyard --- diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index b1fdbf78da9bc..4387bd6de2cae 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -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; }