linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: pata_imx: fix devm_ioremap_resource() return value checking
@ 2014-03-14 17:33 Bartlomiej Zolnierkiewicz
  2014-03-14 18:31 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-14 17:33 UTC (permalink / raw)
  To: linux-arm-kernel

devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure.  Fix the check inside
pata_imx_probe() accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
Compile tested only.

 drivers/ata/pata_imx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/drivers/ata/pata_imx.c
===================================================================
--- a/drivers/ata/pata_imx.c	2014-03-14 16:45:04.260724378 +0100
+++ b/drivers/ata/pata_imx.c	2014-03-14 18:23:38.664623530 +0100
@@ -133,8 +133,8 @@ static int pata_imx_probe(struct platfor
 
 	io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res);
-	if (!priv->host_regs) {
-		ret = -EBUSY;
+	if (IS_ERR(priv->host_regs)) {
+		ret = PTR_ERR(priv->host_regs);
 		goto err;
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] ata: pata_imx: fix devm_ioremap_resource() return value checking
  2014-03-14 17:33 [PATCH] ata: pata_imx: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
@ 2014-03-14 18:31 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-03-14 18:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 14, 2014 at 06:33:13PM +0100, Bartlomiej Zolnierkiewicz wrote:
> devm_ioremap_resource() returns a pointer to the remapped memory or
> an ERR_PTR() encoded error code on failure.  Fix the check inside
> pata_imx_probe() accordingly.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Applied to libata/for-3.15.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-14 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 17:33 [PATCH] ata: pata_imx: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
2014-03-14 18:31 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).