[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0469180-f6b5-acf7-735e-5eaaff77b670@opensource.wdc.com>
Date: Mon, 25 Apr 2022 09:44:29 +0900
From: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
To: Yang Yingliang <yangyingliang@...wei.com>,
linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org
Cc: arnd@...db.de, b.zolnierkie@...sung.com, robert.jarzmik@...e.fr
Subject: Re: [PATCH -next] ata: palmld: fix return value check in
palmld_pata_probe()
On 4/24/22 18:34, Yang Yingliang wrote:
> If devm_platform_ioremap_resource() fails, it never return
> NULL pointer, replace the check with IS_ERR().
>
> Fixes: 57bf0f5a162d ("ARM: pxa: use pdev resource for palmld mmio")
This commit ID does not exist in Linus tree. Is this a commit in the ARM
tree ? If yes, then Arnd, can you take this patch ?
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/ata/pata_palmld.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c
> index 400e65190904..51caa2a427dd 100644
> --- a/drivers/ata/pata_palmld.c
> +++ b/drivers/ata/pata_palmld.c
> @@ -63,8 +63,8 @@ static int palmld_pata_probe(struct platform_device *pdev)
>
> /* remap drive's physical memory address */
> mem = devm_platform_ioremap_resource(pdev, 0);
> - if (!mem)
> - return -ENOMEM;
> + if (IS_ERR(mem))
> + return PTR_ERR(mem);
>
> /* request and activate power and reset GPIOs */
> lda->power = devm_gpiod_get(dev, "power", GPIOD_OUT_HIGH);
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists