From: Charles Keepax Date: Fri, 25 Nov 2016 13:48:30 +0000 (+0000) Subject: gpio: arizona: Tidy up probe error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=975acebbbcb78ce7e97ed7abf960e0b93fa3aec4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git gpio: arizona: Tidy up probe error path There is some unnecessary complexity in the error path which now things are converted to devm is actually very simple. This patch simplifies things. Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c index ed41537ec831..1f91557717a6 100644 --- a/drivers/gpio/gpio-arizona.c +++ b/drivers/gpio/gpio-arizona.c @@ -137,13 +137,10 @@ static int arizona_gpio_probe(struct platform_device *pdev) if (ret < 0) { dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret); - goto err; + return ret; } - return ret; - -err: - return ret; + return 0; } static struct platform_driver arizona_gpio_driver = {