[PATCH -next] phy: usb: phy-brcm-usb: Remove redundant return value check of platform_get_resource()

From: Wei Yongjun
Date: Wed Jan 17 2018 - 06:23:34 EST


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@xxxxxxxxxx>
---
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");