From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Ray Jui <rjui@broadcom.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
bcm-kernel-feedback-list@broadcom.com,
linux-gpio <linux-gpio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
Date: Mon, 25 May 2020 11:16:58 +0200 [thread overview]
Message-ID: <CAMpxmJVYPweUL9J5uitp6zCAniQAZ2+EBuxt-pYcDarLJkcqDQ@mail.gmail.com> (raw)
In-Reply-To: <1590120740-22912-1-git-send-email-yangtiezhu@loongson.cn>
pt., 22 maj 2020 o 06:12 Tiezhu Yang <yangtiezhu@loongson.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@loongson.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
prev parent reply other threads:[~2020-05-25 9:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 4:12 [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe() Tiezhu Yang
2020-05-22 4:12 ` [PATCH 2/3] gpio: pxa: Fix return value of pxa_gpio_probe() Tiezhu Yang
2020-05-22 19:07 ` Robert Jarzmik
2020-05-23 3:24 ` Tiezhu Yang
2020-05-25 9:14 ` Bartosz Golaszewski
2020-05-27 18:26 ` Robert Jarzmik
2020-05-22 4:12 ` [PATCH 3/3] gpio: pxa: Add COMPILE_TEST support Tiezhu Yang
2020-05-25 9:15 ` Bartosz Golaszewski
2020-05-25 9:16 ` Bartosz Golaszewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMpxmJVYPweUL9J5uitp6zCAniQAZ2+EBuxt-pYcDarLJkcqDQ@mail.gmail.com \
--to=bgolaszewski@baylibre.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=rjui@broadcom.com \
--cc=robert.jarzmik@free.fr \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).