From: Sven Wegener Date: Fri, 3 Oct 2008 22:23:48 +0000 (-0700) Subject: leds-pca955x: add proper error handling and fix bogus memory handling X-Git-Tag: v2.6.27-rc9~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95bf14bff58fd200f0c2147c84582cc2488367d0;p=pandora-kernel.git 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 Acked-by: Nate Case Tested-by: Nate Case Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed