diff options
author | Baruch Siach <baruch@tkos.co.il> | 2015-03-02 12:28:45 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-03-09 13:11:00 -0400 |
commit | 11131ba435252cae6099c04417bcf83997ec3241 (patch) | |
tree | 95a2819a960641605f79751c8c477daaef40a518 /drivers/pinctrl/pinctrl-at91.c | |
parent | 939417bd8b909ae34a3b2106531594f5115eaea5 (diff) |
pinctrl: at91: simplify probe error handling
There is no code ender the 'err' label. Just return the error code directly.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index f4cd0b9b2438..6cfe534ab27e 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
@@ -1240,8 +1240,7 @@ static int at91_pinctrl_probe(struct platform_device *pdev) | |||
1240 | 1240 | ||
1241 | if (!info->pctl) { | 1241 | if (!info->pctl) { |
1242 | dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n"); | 1242 | dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n"); |
1243 | ret = -EINVAL; | 1243 | return -EINVAL; |
1244 | goto err; | ||
1245 | } | 1244 | } |
1246 | 1245 | ||
1247 | /* We will handle a range of GPIO pins */ | 1246 | /* We will handle a range of GPIO pins */ |
@@ -1252,9 +1251,6 @@ static int at91_pinctrl_probe(struct platform_device *pdev) | |||
1252 | dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n"); | 1251 | dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n"); |
1253 | 1252 | ||
1254 | return 0; | 1253 | return 0; |
1255 | |||
1256 | err: | ||
1257 | return ret; | ||
1258 | } | 1254 | } |
1259 | 1255 | ||
1260 | static int at91_pinctrl_remove(struct platform_device *pdev) | 1256 | static int at91_pinctrl_remove(struct platform_device *pdev) |