lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJVYPweUL9J5uitp6zCAniQAZ2+EBuxt-pYcDarLJkcqDQ@mail.gmail.com>
Date:   Mon, 25 May 2020 11:16:58 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Ray Jui <rjui@...adcom.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        bcm-kernel-feedback-list@...adcom.com,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()

pt., 22 maj 2020 o 06:12 Tiezhu Yang <yangtiezhu@...ngson.cn> 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@...ngson.cn>
> ---
>  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ