[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140514125524.GB14571@mwanda>
Date: Wed, 14 May 2014 15:55:24 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Felipe Balbi <balbi@...com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch] usb: phy: msm: devm_ioremap() doesn't return ERR_PTRs
devm_ioremap() returns a NULL on error so the IS_ERR() check needs to be
updated.
Fixes: 6b99c68ec1f9 ('usb: phy: msm: Migrate to Managed Device Resource allocation')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index c522c4f..bd32257 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1587,8 +1587,8 @@ static int msm_otg_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
motg->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
- if (IS_ERR(motg->regs))
- return PTR_ERR(motg->regs);
+ if (!motg->regs)
+ return -ENOMEM;
/*
* NOTE: The PHYs can be multiplexed between the chipidea controller
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists