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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140131212623.GA2502@saruman.home>
Date:	Fri, 31 Jan 2014 15:26:23 -0600
From:	Felipe Balbi <balbi@...com>
To:	David Cohen <david.a.cohen@...ux.intel.com>
CC:	<linus.walleij@...aro.org>, <gnurou@...il.com>,
	<linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	"xinhui.pan" <xinhuiX.pan@...el.com>, "bo.he" <bo.he@...el.com>,
	Felibe Balbi <balbi@...com>
Subject: Re: [PATCH v2] gpio-intel-mid: fix the incorrect return of idle
 callback

On Fri, Jan 31, 2014 at 01:08:01PM -0800, David Cohen wrote:
> From: "xinhui.pan" <xinhuiX.pan@...el.com>
> 
> intel_gpio_runtime_idle should return correct error code if it do fail.
> make it more correct even though -EBUSY is the most possible return value.
> 
> Signed-off-by: bo.he <bo.he@...el.com>
> Signed-off-by: xinhui.pan <xinhuiX.pan@...el.com>
> Signed-off-by: David Cohen <david.a.cohen@...ux.intel.com>
> Cc: Felibe Balbi <balbi@...com>

Reviewed-by: Felipe Balbi <balbi@...com>

> ---
>  drivers/gpio/gpio-intel-mid.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
> index 41218e93b9fe..55688d0548e9 100644
> --- a/drivers/gpio/gpio-intel-mid.c
> +++ b/drivers/gpio/gpio-intel-mid.c
> @@ -369,8 +369,8 @@ static const struct irq_domain_ops intel_gpio_irq_ops = {
>  
>  static int intel_gpio_runtime_idle(struct device *dev)
>  {
> -	pm_schedule_suspend(dev, 500);
> -	return -EBUSY;
> +	int err = pm_schedule_suspend(dev, 500);
> +	return err ?: -EBUSY;
>  }
>  
>  static const struct dev_pm_ops intel_gpio_pm_ops = {
> -- 
> 1.8.4.2
> 

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ