pinctrl: at91: simplify probe error handling
PATCH 1/1 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 <[email protected]>
--- drivers/pinctrl/pinctrl-at91.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/pinctrl/pinctrl-at91.c +1 -5
@@ -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)
Signature · 1 line
2.1.4
PATCH 1/1 pinctrl: at91: simplify probe error handling
Quoted 3 lines · Baruch Siach
There is no code ender the 'err' label. Just return the error code directly.
Signed-off-by Baruch Siach <[email protected]>
Reviewed-by Alexandre Belloni <[email protected]>
Quoted 36 lines
--- drivers/pinctrl/pinctrl-at91.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/pinctrl/pinctrl-at91.c +1
-5@@ -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)Signature · 7 lines
2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 pinctrl: at91: simplify probe error handling
In reply to Baruch SiachQuoted 2 lines · Baruch Siach
There is no code ender the 'err' label. Just return the error code directly.
Probably a remainder of pre managed resources time.
Quoted 1 line
Signed-off-by Baruch Siach <[email protected]>
Quoted 36 lines
--- drivers/pinctrl/pinctrl-at91.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/pinctrl/pinctrl-at91.c +1
-5@@ -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)Signature · 7 lines
2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 pinctrl: at91: simplify probe error handling
In reply to Baruch SiachQuoted 3 lines · Baruch Siach
There is no code ender the 'err' label. Just return the error code directly.
Signed-off-by Baruch Siach <[email protected]>
Patch applied with the ACKs.
Yours,
Linus Walleij