Ver Fonte

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>
Charles Keepax há 8 anos atrás
pai
commit
975acebbbc
1 ficheiros alterados com 2 adições e 5 exclusões
  1. 2 5
      drivers/gpio/gpio-arizona.c

+ 2 - 5
drivers/gpio/gpio-arizona.c

@@ -137,13 +137,10 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 	if (ret < 0) {
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
 		dev_err(&pdev->dev, "Could not register gpiochip, %d\n",
 			ret);
 			ret);
-		goto err;
+		return ret;
 	}
 	}
 
 
-	return ret;
-
-err:
-	return ret;
+	return 0;
 }
 }
 
 
 static struct platform_driver arizona_gpio_driver = {
 static struct platform_driver arizona_gpio_driver = {