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: <577977DB.3020008@gmail.com>
Date:	Sun, 03 Jul 2016 21:38:51 +0100
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH] Input: gpio-keys - use devm_add_action_or_reset

On Sunday 12 June 2016 03:28 PM, Sudip Mukherjee wrote:
> If devm_add_action() fails we are printing the error message and
> returning but we have already setup a delayed work or a timer.
> Lets now use the helper devm_add_action_or_reset() and return and in
> case of error the cleanup function will be called by the helper to
> cancel the delayed work or to delete the timer.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>
> ---

A gentle ping.

Regards
Sudip


>   drivers/input/keyboard/gpio_keys.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> index 2909365..2b1d2e9 100644
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
> @@ -542,7 +542,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
>   	 * Install custom action to cancel release timer and
>   	 * workqueue item.
>   	 */
> -	error = devm_add_action(&pdev->dev, gpio_keys_quiesce_key, bdata);
> +	error = devm_add_action_or_reset(&pdev->dev,
> +					 gpio_keys_quiesce_key, bdata);
>   	if (error) {
>   		dev_err(&pdev->dev,
>   			"failed to register quiesce action, error: %d\n",
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ