mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
b032378b4c
commit
13e8e78bdd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user