diff mbox

[2/2] gpio: arizona: Tidy up probe error path

Message ID 1480081710-27305-2-git-send-email-ckeepax@opensource.wolfsonmicro.com
State New
Headers show

Commit Message

Charles Keepax Nov. 25, 2016, 1:48 p.m. UTC
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>
---
 drivers/gpio/gpio-arizona.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Linus Walleij Nov. 30, 2016, 12:50 p.m. UTC | #1
On Fri, Nov 25, 2016 at 2:48 PM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 = {