[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1590120740-22912-1-git-send-email-yangtiezhu@loongson.cn>
Date: Fri, 22 May 2020 12:12:18 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Ray Jui <rjui@...adcom.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: bcm-kernel-feedback-list@...adcom.com, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
Tiezhu Yang <yangtiezhu@...ngson.cn>
Subject: [PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
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
Powered by blists - more mailing lists