]> git.baikalelectronics.ru Git - kernel.git/commit
leds-pca955x: add proper error handling and fix bogus memory handling
authorSven Wegener <sven.wegener@stealer.net>
Fri, 3 Oct 2008 22:23:48 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 Oct 2008 01:22:18 +0000 (18:22 -0700)
commitbdf78246fff1465a3c499b6c5c3cc7988c030821
treeedc4c02c44981aa1a538cf883f8af34a69fbc552
parentad6144d89e0e3b8bdade1d78dd147d06d779eefa
leds-pca955x: add proper error handling and fix bogus memory handling

Check the return value of led_classdev_register and unregister all
registered devices, if registering one device fails.  Also the dynamic
memory handling is totally bogus.  You can't allocate multiple chunks via
kzalloc() and expect them to be in order later.  I wonder how this ever
worked.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Nate Case <ncase@xes-inc.com>
Tested-by: Nate Case <ncase@xes-inc.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/leds/leds-pca955x.c