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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ECA484F.5000107@linux.vnet.ibm.com>
Date:	Mon, 21 Nov 2011 18:17:11 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
CC:	Linux PM list <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PM / Sleep: Simplify device_suspend_noirq()

On 11/20/2011 04:13 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@...k.pl>
> 
> Remove a few if () and return statements in device_suspend_noirq()
> that aren't really necessary.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

Thanks,
Srivatsa S. Bhat

> ---
>  drivers/base/power/main.c |   12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> Index: linux/drivers/base/power/main.c
> ===================================================================
> --- linux.orig/drivers/base/power/main.c
> +++ linux/drivers/base/power/main.c
> @@ -763,31 +763,23 @@ static pm_message_t resume_event(pm_mess
>   */
>  static int device_suspend_noirq(struct device *dev, pm_message_t state)
>  {
> -	int error;
> +	int error = 0;
> 
>  	if (dev->pm_domain) {
>  		pm_dev_dbg(dev, state, "LATE power domain ");
>  		error = pm_noirq_op(dev, &dev->pm_domain->ops, state);
> -		if (error)
> -			return error;
>  	} else if (dev->type && dev->type->pm) {
>  		pm_dev_dbg(dev, state, "LATE type ");
>  		error = pm_noirq_op(dev, dev->type->pm, state);
> -		if (error)
> -			return error;
>  	} else if (dev->class && dev->class->pm) {
>  		pm_dev_dbg(dev, state, "LATE class ");
>  		error = pm_noirq_op(dev, dev->class->pm, state);
> -		if (error)
> -			return error;
>  	} else if (dev->bus && dev->bus->pm) {
>  		pm_dev_dbg(dev, state, "LATE ");
>  		error = pm_noirq_op(dev, dev->bus->pm, state);
> -		if (error)
> -			return error;
>  	}
> 
> -	return 0;
> +	return error;
>  }
> 
>  /**

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ