Re: [patch] da9052-battery: don't free IRQ that wasn't requested

2012-09-20 Thread Anton Vorontsov
On Thu, Sep 06, 2012 at 08:07:58AM -0700, Dan Carpenter wrote: [...] > >for (j=0; j <= i ;j++ ) { >^^ > The count up loops are prone to the exact same off by one bugs. ;) > You've got one in your sample code. Plus I'd have to declare > another variable and send a v2 patch

Re: [patch] da9052-battery: don't free IRQ that wasn't requested

2012-09-06 Thread Dan Carpenter
On Wed, Sep 05, 2012 at 04:11:01PM +0200, walter harms wrote: > > > Am 05.09.2012 14:34, schrieb Dan Carpenter: > > 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 cas

Re: [patch] da9052-battery: don't free IRQ that wasn't requested

2012-09-05 Thread walter harms
Am 05.09.2012 14:34, schrieb Dan Carpenter: > 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 orig

[patch] da9052-battery: don't free IRQ that wasn't requested

2012-09-05 Thread Dan Carpenter
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. Sig