summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-03-14 18:33:13 +0100
committerTejun Heo <tj@kernel.org>2014-03-14 14:30:28 -0400
commit13e8e78bdd148f615da1e5d1edcf0b58b7c2b684 (patch)
treeaed7fd5407275e4ece45234022f9441f590601f4 /drivers/ata
parentb032378b4c3ffba86d2c78699b385ae646397938 (diff)
downloadtalos-obmc-linux-13e8e78bdd148f615da1e5d1edcf0b58b7c2b684.tar.gz
talos-obmc-linux-13e8e78bdd148f615da1e5d1edcf0b58b7c2b684.zip
ata: pata_imx: fix devm_ioremap_resource() return value checking
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> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 121c748314c3..161769343ce7 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -131,8 +131,8 @@ static int pata_imx_probe(struct platform_device *pdev)
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;
}
OpenPOWER on IntegriCloud