diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2016-11-25 13:48:30 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-12-07 15:23:38 +0100 |
commit | 975acebbbcb78ce7e97ed7abf960e0b93fa3aec4 (patch) | |
tree | db6b560be77b70df5bd10cd876611e3e0c68a1b0 /drivers/gpio/gpio-arizona.c | |
parent | a3ee78ec6a5d9a86267a09de9ff27d4e0a21acca (diff) | |
download | op-kernel-dev-975acebbbcb78ce7e97ed7abf960e0b93fa3aec4.zip op-kernel-dev-975acebbbcb78ce7e97ed7abf960e0b93fa3aec4.tar.gz |
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 <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-arizona.c')
-rw-r--r-- | drivers/gpio/gpio-arizona.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c index ed41537..1f91557 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 = { |