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>] [day] [month] [year] [list]
Date:   Wed, 17 Jan 2018 11:29:30 +0000
From:   Wei Yongjun <weiyongjun1@...wei.com>
To:     Al Cooper <alcooperx@...il.com>,
        Kishon Vijay Abraham I <kishon@...com>
CC:     Wei Yongjun <weiyongjun1@...wei.com>,
        <linux-kernel@...r.kernel.org>,
        <bcm-kernel-feedback-list@...adcom.com>
Subject: [PATCH -next] phy: usb: phy-brcm-usb: Remove redundant return value check of platform_get_resource()

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/phy/broadcom/phy-brcm-usb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c
index 195b981..9f01ebe 100644
--- a/drivers/phy/broadcom/phy-brcm-usb.c
+++ b/drivers/phy/broadcom/phy-brcm-usb.c
@@ -307,10 +307,6 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
 	dev_dbg(dev, "Best mapping table is for %s\n",
 		priv->ini.family_name);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "can't get USB_CTRL base address\n");
-		return -EINVAL;
-	}
 	priv->ini.ctrl_regs = devm_ioremap_resource(dev, res);
 	if (IS_ERR(priv->ini.ctrl_regs)) {
 		dev_err(dev, "can't map CTRL register space\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ