* [PATCH -next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe
@ 2020-09-21 8:24 Liu Shixin
2020-09-22 13:30 ` Viresh Kumar
2020-09-29 13:25 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Liu Shixin @ 2020-09-21 8:24 UTC (permalink / raw)
To: Viresh Kumar, Linus Walleij
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Liu Shixin
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
drivers/pinctrl/spear/pinctrl-spear310.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/pinctrl/spear/pinctrl-spear310.c b/drivers/pinctrl/spear/pinctrl-spear310.c
index 393b2b97d527..9d9facc4a6e4 100644
--- a/drivers/pinctrl/spear/pinctrl-spear310.c
+++ b/drivers/pinctrl/spear/pinctrl-spear310.c
@@ -379,8 +379,6 @@ static const struct of_device_id spear310_pinctrl_of_match[] = {
static int spear310_pinctrl_probe(struct platform_device *pdev)
{
- int ret;
-
spear3xx_machdata.groups = spear310_pingroups;
spear3xx_machdata.ngroups = ARRAY_SIZE(spear310_pingroups);
spear3xx_machdata.functions = spear310_functions;
@@ -392,11 +390,7 @@ static int spear310_pinctrl_probe(struct platform_device *pdev)
spear3xx_machdata.modes_supported = false;
- ret = spear_pinctrl_probe(pdev, &spear3xx_machdata);
- if (ret)
- return ret;
-
- return 0;
+ return spear_pinctrl_probe(pdev, &spear3xx_machdata);
}
static struct platform_driver spear310_pinctrl_driver = {
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe
2020-09-21 8:24 [PATCH -next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe Liu Shixin
@ 2020-09-22 13:30 ` Viresh Kumar
2020-09-29 13:25 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2020-09-22 13:30 UTC (permalink / raw)
To: Liu Shixin
Cc: Viresh Kumar, Linus Walleij, linux-arm-kernel, linux-gpio, linux-kernel
On 21-09-20, 16:24, Liu Shixin wrote:
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
> drivers/pinctrl/spear/pinctrl-spear310.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-spear310.c b/drivers/pinctrl/spear/pinctrl-spear310.c
> index 393b2b97d527..9d9facc4a6e4 100644
> --- a/drivers/pinctrl/spear/pinctrl-spear310.c
> +++ b/drivers/pinctrl/spear/pinctrl-spear310.c
> @@ -379,8 +379,6 @@ static const struct of_device_id spear310_pinctrl_of_match[] = {
>
> static int spear310_pinctrl_probe(struct platform_device *pdev)
> {
> - int ret;
> -
> spear3xx_machdata.groups = spear310_pingroups;
> spear3xx_machdata.ngroups = ARRAY_SIZE(spear310_pingroups);
> spear3xx_machdata.functions = spear310_functions;
> @@ -392,11 +390,7 @@ static int spear310_pinctrl_probe(struct platform_device *pdev)
>
> spear3xx_machdata.modes_supported = false;
>
> - ret = spear_pinctrl_probe(pdev, &spear3xx_machdata);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return spear_pinctrl_probe(pdev, &spear3xx_machdata);
> }
>
> static struct platform_driver spear310_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 spear310_pinctrl_probe
2020-09-21 8:24 [PATCH -next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe Liu Shixin
2020-09-22 13:30 ` Viresh Kumar
@ 2020-09-29 13:25 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-09-29 13:25 UTC (permalink / raw)
To: Liu Shixin
Cc: Viresh Kumar, Linux ARM, open list:GPIO SUBSYSTEM, linux-kernel
On Mon, Sep 21, 2020 at 10:02 AM Liu Shixin <liushixin2@huawei.com> wrote:
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-29 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 8:24 [PATCH -next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe Liu Shixin
2020-09-22 13:30 ` Viresh Kumar
2020-09-29 13:25 ` 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).