Skip to content

Commit

Permalink
gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
Browse files Browse the repository at this point in the history
Propagate the error code returned by devm_platform_ioremap_resource()
out of probe() instead of overwriting it.

Fixes: 72d8cb7 ("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>
  • Loading branch information
Tiezhu Yang authored and Bartosz Golaszewski committed May 25, 2020
1 parent 558ab2e commit 98f7d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-bcm-kona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 98f7d1b

Please sign in to comment.