diff mbox series

cpufreq: maple: Remove redundant code from maple_cpufreq_init()

Message ID dfb046a881d254f5133e6a1f86a04f49e73c56f9.1554718622.git.viresh.kumar@linaro.org (mailing list archive)
State Accepted
Delegated to: viresh kumar
Headers show
Series cpufreq: maple: Remove redundant code from maple_cpufreq_init() | expand

Commit Message

Viresh Kumar April 8, 2019, 10:17 a.m. UTC
The success path and error path both look the same, don't duplicate the
code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/maple-cpufreq.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Rafael J. Wysocki April 8, 2019, 10:41 a.m. UTC | #1
On Monday, April 8, 2019 12:17:06 PM CEST Viresh Kumar wrote:
> The success path and error path both look the same, don't duplicate the
> code.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/maple-cpufreq.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/maple-cpufreq.c
> b/drivers/cpufreq/maple-cpufreq.c index a05f1342ec02..a94355723ef8 100644
> --- a/drivers/cpufreq/maple-cpufreq.c
> +++ b/drivers/cpufreq/maple-cpufreq.c
> @@ -231,10 +231,6 @@ static int __init maple_cpufreq_init(void)
> 
>  	rc = cpufreq_register_driver(&maple_cpufreq_driver);
> 
> -	of_node_put(cpunode);
> -
> -	return rc;
> -
>  bail_noprops:
>  	of_node_put(cpunode);

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

I'm assuming this to land in your tree.
Viresh Kumar April 8, 2019, 10:45 a.m. UTC | #2
On 08-04-19, 12:41, Rafael J. Wysocki wrote:
> On Monday, April 8, 2019 12:17:06 PM CEST Viresh Kumar wrote:
> > The success path and error path both look the same, don't duplicate the
> > code.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  drivers/cpufreq/maple-cpufreq.c | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> > diff --git a/drivers/cpufreq/maple-cpufreq.c
> > b/drivers/cpufreq/maple-cpufreq.c index a05f1342ec02..a94355723ef8 100644
> > --- a/drivers/cpufreq/maple-cpufreq.c
> > +++ b/drivers/cpufreq/maple-cpufreq.c
> > @@ -231,10 +231,6 @@ static int __init maple_cpufreq_init(void)
> > 
> >  	rc = cpufreq_register_driver(&maple_cpufreq_driver);
> > 
> > -	of_node_put(cpunode);
> > -
> > -	return rc;
> > -
> >  bail_noprops:
> >  	of_node_put(cpunode);
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> I'm assuming this to land in your tree.

Yes, applied now. Thanks.
diff mbox series

Patch

diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index a05f1342ec02..a94355723ef8 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -231,10 +231,6 @@  static int __init maple_cpufreq_init(void)
 
 	rc = cpufreq_register_driver(&maple_cpufreq_driver);
 
-	of_node_put(cpunode);
-
-	return rc;
-
 bail_noprops:
 	of_node_put(cpunode);