Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11131ba4 authored by Baruch Siach's avatar Baruch Siach Committed by Linus Walleij
Browse files

pinctrl: at91: simplify probe error handling



There is no code ender the 'err' label. Just return the error code directly.

Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Reviewed-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 939417bd
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -1240,8 +1240,7 @@ static int at91_pinctrl_probe(struct platform_device *pdev)


	if (!info->pctl) {
	if (!info->pctl) {
		dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n");
		dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n");
		ret = -EINVAL;
		return -EINVAL;
		goto err;
	}
	}


	/* We will handle a range of GPIO pins */
	/* We will handle a range of GPIO pins */
@@ -1252,9 +1251,6 @@ static int at91_pinctrl_probe(struct platform_device *pdev)
	dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n");
	dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n");


	return 0;
	return 0;

err:
	return ret;
}
}


static int at91_pinctrl_remove(struct platform_device *pdev)
static int at91_pinctrl_remove(struct platform_device *pdev)