Skip to content

Commit 015618c

Browse files
Yang YingliangDamien Le Moal
authored andcommitted
ata: palmld: fix return value check in palmld_pata_probe()
If devm_platform_ioremap_resource() fails, it never return NULL pointer, replace the check with IS_ERR(). Fixes: 57bf0f5 ("ARM: pxa: use pdev resource for palmld mmio") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 171a931 commit 015618c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ata/pata_palmld.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ static int palmld_pata_probe(struct platform_device *pdev)
6363

6464
/* remap drive's physical memory address */
6565
mem = devm_platform_ioremap_resource(pdev, 0);
66-
if (!mem)
67-
return -ENOMEM;
66+
if (IS_ERR(mem))
67+
return PTR_ERR(mem);
6868

6969
/* request and activate power and reset GPIOs */
7070
lda->power = devm_gpiod_get(dev, "power", GPIOD_OUT_HIGH);

0 commit comments

Comments
 (0)