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: <6cd859e9f307c9358d81e5d8d7856496d8c69b6b.camel@gmail.com>
Date: Mon, 07 Oct 2024 08:27:28 +0200
From: Nuno Sá <noname.nuno@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>, Michael Hennerich
	 <michael.hennerich@...log.com>, Nuno Sa <nuno.sa@...log.com>
Cc: Utsav Agarwal <utsav.agarwal@...log.com>, linux-input@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: adp5588-keys - do not try to disable interrupt 0

On Fri, 2024-10-04 at 07:07 -0700, Dmitry Torokhov wrote:
> Commit dc748812fca0 ("Input: adp5588-keys - add support for pure gpio")
> made having interrupt line optional for the device, however it neglected
> to update suspend and resume handlers that try to disable interrupts
> for the duration of suspend.
> 
> Fix this by checking if interrupt number assigned to the i2c device is
> not 0 before trying to disable or reenable it.
> 
> Fixes: dc748812fca0 ("Input: adp5588-keys - add support for pure gpio")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@...log.com>

>  drivers/input/keyboard/adp5588-keys.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/adp5588-keys.c
> b/drivers/input/keyboard/adp5588-keys.c
> index d25d63a807f2..dc734974ce06 100644
> --- a/drivers/input/keyboard/adp5588-keys.c
> +++ b/drivers/input/keyboard/adp5588-keys.c
> @@ -822,7 +822,8 @@ static int adp5588_suspend(struct device *dev)
>  {
>  	struct i2c_client *client = to_i2c_client(dev);
>  
> -	disable_irq(client->irq);
> +	if (client->irq)
> +		disable_irq(client->irq);
>  
>  	return 0;
>  }
> @@ -831,7 +832,8 @@ static int adp5588_resume(struct device *dev)
>  {
>  	struct i2c_client *client = to_i2c_client(dev);
>  
> -	enable_irq(client->irq);
> +	if (client->irq)
> +		enable_irq(client->irq);
>  
>  	return 0;
>  }
> -- 
> 2.47.0.rc0.187.ge670bccf7e-goog
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ