]> git.baikalelectronics.ru Git - kernel.git/commit
da9052-battery: Don't free IRQ that wasn't requested
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Sep 2012 12:34:41 +0000 (15:34 +0300)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 20 Sep 2012 22:00:12 +0000 (15:00 -0700)
commit22f9f5decd15e9fce3cf6febbc2b2bf8ac00b9d6
tree7a3fb12a4ba8a36315c20c6a843c3b45463df189
parentf6e4d1f7415ca356203bf7e782784bb41a1f42df
da9052-battery: Don't free IRQ that wasn't requested

We should decrement "i" before doing the free_irq().  If we call this
because request_threaded_irq() failed then we don't want to free the
thing which failed.  Or in the case where we get here because
power_supply_register() failed then the original codes does a read past
the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/da9052-battery.c