* [PATCH] pinctrl: at91: simplify probe error handling
@ 2015-03-02 17:28 Baruch Siach
2015-03-03 9:08 ` Alexandre Belloni
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Baruch Siach @ 2015-03-02 17:28 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard
Cc: Linus Walleij, linux-arm-kernel, linux-gpio, Baruch Siach
There is no code ender the 'err' label. Just return the error code directly.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
drivers/pinctrl/pinctrl-at91.c | 6 +-----
1 file changed, 1 insertion(+), 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)
if (!info->pctl) {
dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n");
- ret = -EINVAL;
- goto err;
+ return -EINVAL;
}
/* 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");
return 0;
-
-err:
- return ret;
}
static int at91_pinctrl_remove(struct platform_device *pdev)
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] pinctrl: at91: simplify probe error handling
2015-03-02 17:28 [PATCH] pinctrl: at91: simplify probe error handling Baruch Siach
@ 2015-03-03 9:08 ` Alexandre Belloni
2015-03-04 13:32 ` Ludovic Desroches
2015-03-09 16:05 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2015-03-03 9:08 UTC (permalink / raw)
To: Baruch Siach
Cc: Jean-Christophe Plagniol-Villard, linux-gpio, Linus Walleij,
linux-arm-kernel
On 02/03/2015 at 19:28:45 +0200, Baruch Siach wrote :
> 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>
> ---
> drivers/pinctrl/pinctrl-at91.c | 6 +-----
> 1 file changed, 1 insertion(+), 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)
>
> if (!info->pctl) {
> dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n");
> - ret = -EINVAL;
> - goto err;
> + return -EINVAL;
> }
>
> /* 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");
>
> return 0;
> -
> -err:
> - return ret;
> }
>
> static int at91_pinctrl_remove(struct platform_device *pdev)
> --
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pinctrl: at91: simplify probe error handling
2015-03-02 17:28 [PATCH] pinctrl: at91: simplify probe error handling Baruch Siach
2015-03-03 9:08 ` Alexandre Belloni
@ 2015-03-04 13:32 ` Ludovic Desroches
2015-03-09 16:05 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Desroches @ 2015-03-04 13:32 UTC (permalink / raw)
To: Baruch Siach
Cc: Jean-Christophe Plagniol-Villard, linux-gpio, Linus Walleij,
linux-arm-kernel
On Mon, Mar 02, 2015 at 07:28:45PM +0200, Baruch Siach wrote:
> There is no code ender the 'err' label. Just return the error code directly.
>
Probably a remainder of pre managed resources time.
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
> drivers/pinctrl/pinctrl-at91.c | 6 +-----
> 1 file changed, 1 insertion(+), 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)
>
> if (!info->pctl) {
> dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n");
> - ret = -EINVAL;
> - goto err;
> + return -EINVAL;
> }
>
> /* 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");
>
> return 0;
> -
> -err:
> - return ret;
> }
>
> static int at91_pinctrl_remove(struct platform_device *pdev)
> --
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pinctrl: at91: simplify probe error handling
2015-03-02 17:28 [PATCH] pinctrl: at91: simplify probe error handling Baruch Siach
2015-03-03 9:08 ` Alexandre Belloni
2015-03-04 13:32 ` Ludovic Desroches
@ 2015-03-09 16:05 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-03-09 16:05 UTC (permalink / raw)
To: Baruch Siach
Cc: Jean-Christophe Plagniol-Villard,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org
On Mon, Mar 2, 2015 at 6:28 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> There is no code ender the 'err' label. Just return the error code directly.
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Patch applied with the ACKs.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-09 16:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 17:28 [PATCH] pinctrl: at91: simplify probe error handling Baruch Siach
2015-03-03 9:08 ` Alexandre Belloni
2015-03-04 13:32 ` Ludovic Desroches
2015-03-09 16:05 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).