Re: [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pt., 22 maj 2020 o 06:12 Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> napisał(a):
>
> When call function devm_platform_ioremap_resource(), we should use IS_ERR()
> to check the return value and return PTR_ERR() if failed.
>
> Fixes: 72d8cb715477 ("drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()")
> Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
> ---
>  drivers/gpio/gpio-bcm-kona.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index baee8c3..cf3687a 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -625,7 +625,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
>
>         kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(kona_gpio->reg_base)) {
> -               ret = -ENXIO;
> +               ret = PTR_ERR(kona_gpio->reg_base);
>                 goto err_irq_domain;
>         }
>
> --
> 2.1.0
>

I fixed the commit message, since this patch addresses the error code
propagation, not the checking itself. Applied for fixes.

Bartosz




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux