lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160209035035.GB10843@vireshk>
Date:	Tue, 9 Feb 2016 09:20:35 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Linux PM list <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: governor: Drop pointless goto from
 cpufreq_governor_init()

On 08-02-16, 23:57, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> It is silly to jump around "return 0", so don't do that.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> 
> On top of the bleeding-edge branch of linux-pm.git.
> 
> Thanks,
> Rafael
> 
> ---
>  drivers/cpufreq/cpufreq_governor.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> @@ -394,12 +394,11 @@ static int cpufreq_governor_init(struct
>  
>  	ret = sysfs_create_group(get_governor_parent_kobj(policy),
>  				 get_sysfs_attr(gov));
> -	if (ret)
> -		goto reset_gdbs_data;
> +	if (!ret)
> +		return 0;
>  
> -	return 0;
> +	/* Failure, so roll back. */
>  
> -reset_gdbs_data:
>  	policy->governor_data = NULL;
>  
>  	if (!have_governor_per_policy())

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ