summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-05-22 12:12:18 +0800
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-05-25 11:17:18 +0200
commit98f7d1b15e87c84488b30ecc4ec753b0690b9dbf (patch)
tree6a6aa17d51f74d91a513abd473d7c73b80b5b0c4 /drivers/gpio
parent558ab2e8155e5f42ca0a6407957cd4173dc166cc (diff)
downloadlinux-98f7d1b15e87c84488b30ecc4ec753b0690b9dbf.tar.bz2
gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
Propagate the error code returned by devm_platform_ioremap_resource() out of probe() instead of overwriting it. Fixes: 72d8cb715477 ("drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-bcm-kona.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index baee8c3f06ad..cf3687a7925f 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;
}