Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436039
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Input: snvs_pwrkey - use devm_add_action_or_reset |
| Date | 2016-07-03 22:40 +0200 |
| Message-ID | <rQWlj-4MM-7@gated-at.bofh.it> (permalink) |
| References | <rJeIp-1oh-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sunday 12 June 2016 03:34 PM, Sudip Mukherjee wrote:
> If devm_add_action() fails we are printing the error message and
> returning but we have already setup a timer. Lets now use the helper
> devm_add_action_or_reset() and return and so in case of error the
> cleanup function will be called by the helper to delete the timer.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
A gentle ping.
Regards
Sudip
> drivers/input/keyboard/snvs_pwrkey.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
> index 24a9f59..c301419 100644
> --- a/drivers/input/keyboard/snvs_pwrkey.c
> +++ b/drivers/input/keyboard/snvs_pwrkey.c
> @@ -150,7 +150,8 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
> input_set_capability(input, EV_KEY, pdata->keycode);
>
> /* input customer action to cancel release timer */
> - error = devm_add_action(&pdev->dev, imx_snvs_pwrkey_act, pdata);
> + error = devm_add_action_or_reset(&pdev->dev,
> + imx_snvs_pwrkey_act, pdata);
> if (error) {
> dev_err(&pdev->dev, "failed to register remove action\n");
> return error;
>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] Input: snvs_pwrkey - use devm_add_action_or_reset Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-07-03 22:40 +0200
csiph-web