]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Fri, 22 May 2020 04:12:18 +0000 (12:12 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 25 May 2020 09:17:18 +0000 (11:17 +0200)
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>
drivers/gpio/gpio-bcm-kona.c

index baee8c3f06ad864a9bcc6b24d36c2e414d97ff97..cf3687a7925ff0b01cf9a67190ca537f3cbf8880 100644 (file)
@@ -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;
        }