lkml.org 
[lkml]   [2012]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] lp8727_charger: free_irq when lp8727_register_psy fail
From
Date
Sorry Guys on disturbing you,

Will you guys please ACK, NACK or comment on this?

Thanks,

On Sun, 2012-07-29 at 23:31 +0545, Devendra Naga wrote:
> actually the driver does a request_threaded_irq and after this it calls
> lp8727_register_psy, and if it fails it doesn't free the irqs that it
> registered to
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> ---
> drivers/power/lp8727_charger.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
> index d8b7578..699f0ef 100644
> --- a/drivers/power/lp8727_charger.c
> +++ b/drivers/power/lp8727_charger.c
> @@ -454,11 +454,13 @@ static int lp8727_probe(struct i2c_client *cl, const struct i2c_device_id *id)
> ret = lp8727_register_psy(pchg);
> if (ret) {
> dev_err(pchg->dev, "power supplies register err: %d", ret);
> - goto error;
> + goto error_irq;
> }
>
> return 0;
>
> +error_irq:
> + free_irq(pchg->client->irq, pchg);
> error:
> kfree(pchg);
> return ret;




\
 
 \ /
  Last update: 2012-08-19 18:41    [W:0.216 / U:0.280 seconds]
©2003-2014 Jasper Spaans. Advertise on this site