From: Dan Carpenter Date: Wed, 27 Jun 2012 09:10:56 +0000 (+0800) Subject: leds-lp5523: BUG() in error handling in probe() X-Git-Tag: v3.6-rc1~76^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5391dd0a9d084633e20e6583cfed233581c452f9;p=pandora-kernel.git leds-lp5523: BUG() in error handling in probe() Inside the error handling in lp5523_init_led(), there is a place that calls to led_classdev_unregister(). When we unregister the LED drivers, it tries to set the brightness to OFF. In this driver setting the brightness is done through a work queue and the work queue hasn't been initialized yet. The result is that we trigger a WARN_ON() in the __queue_work(). The fix is to move the INIT_WORK() in front of the call to lp5523_init_led(). Matt Renzelmann found this using a bug finding tool. Reported-by: Matt Renzelmann Signed-off-by: Dan Carpenter Signed-off-by: Bryan Wu --- Reading git-diff-tree failed