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]
Date:	Tue, 7 Oct 2014 09:38:56 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Pramod Gurav <pramod.gurav@...rtplayin.com>
Cc:	linux-kernel@...r.kernel.org,
	Michael Hennerich <michael.hennerich@...log.com>,
	linux-input@...r.kernel.org
Subject: Re: [PATCH] Input: adp5588-keys: cancel workqueue in failure path

On Tue, Oct 07, 2014 at 01:00:49PM +0530, Pramod Gurav wrote:
> This change introduces a label to call cancel_delayed_work_sync in
> failure path.
> 
> Cc: Michael Hennerich <michael.hennerich@...log.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: linux-input@...r.kernel.org
> Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
> ---
>  drivers/input/keyboard/adp5588-keys.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c
> index 5ef7fcf..b494062 100644
> --- a/drivers/input/keyboard/adp5588-keys.c
> +++ b/drivers/input/keyboard/adp5588-keys.c
> @@ -559,7 +559,7 @@ static int adp5588_probe(struct i2c_client *client,
>  	error = input_register_device(input);
>  	if (error) {
>  		dev_err(&client->dev, "unable to register input device\n");
> -		goto err_free_mem;
> +		goto err_delayed_work;
>  	}
>  
>  	error = request_irq(client->irq, adp5588_irq,
> @@ -592,6 +592,8 @@ static int adp5588_probe(struct i2c_client *client,
>   err_unreg_dev:
>  	input_unregister_device(input);
>  	input = NULL;
> + err_delayed_work:
> +	cancel_delayed_work_sync(&kpad->work);

We do not need to have a separate label, just need to cancel workqueue
after freeing interrupt. I adjusted the patch and applied.

Thanks.

-- 
Dmitry
--
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