* [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe()
@ 2020-12-10 13:57 Zheng Yongjun
2020-12-10 15:59 ` Viresh Kumar
2020-12-12 0:42 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-10 13:57 UTC (permalink / raw)
To: vireshk, linus.walleij, linux-arm-kernel, linux-gpio, linux-kernel
Cc: Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/pinctrl/spear/pinctrl-spear300.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pinctrl/spear/pinctrl-spear300.c b/drivers/pinctrl/spear/pinctrl-spear300.c
index e39913a18139..d53a04597cbe 100644
--- a/drivers/pinctrl/spear/pinctrl-spear300.c
+++ b/drivers/pinctrl/spear/pinctrl-spear300.c
@@ -654,8 +654,6 @@ static const struct of_device_id spear300_pinctrl_of_match[] = {
static int spear300_pinctrl_probe(struct platform_device *pdev)
{
- int ret;
-
spear3xx_machdata.groups = spear300_pingroups;
spear3xx_machdata.ngroups = ARRAY_SIZE(spear300_pingroups);
spear3xx_machdata.functions = spear300_functions;
@@ -669,11 +667,7 @@ static int spear300_pinctrl_probe(struct platform_device *pdev)
pmx_init_addr(&spear3xx_machdata, PMX_CONFIG_REG);
- ret = spear_pinctrl_probe(pdev, &spear3xx_machdata);
- if (ret)
- return ret;
-
- return 0;
+ return spear_pinctrl_probe(pdev, &spear3xx_machdata);
}
static struct platform_driver spear300_pinctrl_driver = {
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe()
2020-12-10 13:57 [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe() Zheng Yongjun
@ 2020-12-10 15:59 ` Viresh Kumar
2020-12-12 0:42 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2020-12-10 15:59 UTC (permalink / raw)
To: Zheng Yongjun
Cc: vireshk, linus.walleij, linux-arm-kernel, linux-gpio, linux-kernel
On 10-12-20, 21:57, Zheng Yongjun wrote:
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> drivers/pinctrl/spear/pinctrl-spear300.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-spear300.c b/drivers/pinctrl/spear/pinctrl-spear300.c
> index e39913a18139..d53a04597cbe 100644
> --- a/drivers/pinctrl/spear/pinctrl-spear300.c
> +++ b/drivers/pinctrl/spear/pinctrl-spear300.c
> @@ -654,8 +654,6 @@ static const struct of_device_id spear300_pinctrl_of_match[] = {
>
> static int spear300_pinctrl_probe(struct platform_device *pdev)
> {
> - int ret;
> -
> spear3xx_machdata.groups = spear300_pingroups;
> spear3xx_machdata.ngroups = ARRAY_SIZE(spear300_pingroups);
> spear3xx_machdata.functions = spear300_functions;
> @@ -669,11 +667,7 @@ static int spear300_pinctrl_probe(struct platform_device *pdev)
>
> pmx_init_addr(&spear3xx_machdata, PMX_CONFIG_REG);
>
> - ret = spear_pinctrl_probe(pdev, &spear3xx_machdata);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return spear_pinctrl_probe(pdev, &spear3xx_machdata);
> }
>
> static struct platform_driver spear300_pinctrl_driver = {
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe()
2020-12-10 13:57 [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe() Zheng Yongjun
2020-12-10 15:59 ` Viresh Kumar
@ 2020-12-12 0:42 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-12-12 0:42 UTC (permalink / raw)
To: Zheng Yongjun
Cc: Viresh Kumar, Linux ARM, open list:GPIO SUBSYSTEM, linux-kernel
On Thu, Dec 10, 2020 at 2:57 PM Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-12 0:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:57 [PATCH -next] pinctrl/spear: simplify the return expression of spear300_pinctrl_probe() Zheng Yongjun
2020-12-10 15:59 ` Viresh Kumar
2020-12-12 0:42 ` 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).