mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] phy: usb: phy-brcm-usb: Remove redundant return value check of platform_get_resource()
@ 2018-01-17 11:29 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2018-01-17 11:29 UTC (permalink / raw)
  To: Al Cooper, Kishon Vijay Abraham I
  Cc: Wei Yongjun, linux-kernel, bcm-kernel-feedback-list

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-17 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 11:29 [PATCH -next] phy: usb: phy-brcm-usb: Remove redundant return value check of platform_get_resource() Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®