lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] add LED driver for PCA9663 I2C chip
On Mon, 30 Jan 2012 16:28:49 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:

> > +exit:
> > + while (i--) {
> > + led_classdev_unregister(&pca9633[i].led_cdev);
> > + cancel_work_sync(&pca9633[i].work);
> > + }
>
> This (untested!) loop has an off-by-one error.

Well, it's partly wrong. It's wrong for the cancel_work_sync() but not
for the led_classdev_unregister(). The cancel_work_sync() can just be
removed: we haven't scheduled any works yet.




\
 
 \ /
  Last update: 2012-01-31 01:37    [W:0.064 / U:5.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site