lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1474718574-14445-1-git-send-email-weiyj.lk@gmail.com>
Date:   Sat, 24 Sep 2016 12:02:54 +0000
From:   Wei Yongjun <weiyj.lk@...il.com>
To:     Corey Minyard <minyard@....org>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>,
        openipmi-developer@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()

From: Wei Yongjun <weiyongjun1@...wei.com>

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 drivers/char/ipmi/bt-bmc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index de64bf1..b49e613 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -432,11 +432,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, bt_bmc);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "Unable to find resources\n");
-		return -ENXIO;
-	}
-
 	bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(bt_bmc->base))
 		return PTR_ERR(bt_bmc->base);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ