ab8500_fg: Balance IRQ enable
authorRickard Andersson <rickard.andersson@stericsson.com>
Fri, 11 Jan 2013 13:12:55 +0000 (13:12 +0000)
committerAnton Vorontsov <anton@enomsg.org>
Wed, 16 Jan 2013 01:44:26 +0000 (17:44 -0800)
In case of time out error IRQ needs to be disabled
otherwise we will get unbalanced enable/disable pairs.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/ab8500_fg.c

index 76fab6b..d2d14ea 100644 (file)
@@ -745,6 +745,7 @@ int ab8500_fg_inst_curr_blocking(struct ab8500_fg *di)
        dev_dbg(di->dev, "%s instant current: %d", __func__, res);
        return res;
 fail:
+       disable_irq(di->irq);
        mutex_unlock(&di->cc_lock);
        return ret;
 }