Message ID | 20200921082448.2591929-1-liushixin2@huawei.com |
---|---|
State | Accepted |
Commit | 43b7229ef86ffb1c6720316cda8bea330fc8bc2c |
Headers | show |
Series | [-next] pinctrl: spear: simplify the return expression of spear310_pinctrl_probe | expand |
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
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
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 = {
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(-)