Skip to content
Commit 95bf14bf authored by Sven Wegener's avatar Sven Wegener Committed by Linus Torvalds
Browse files

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: default avatarSven Wegener <sven.wegener@stealer.net>
Acked-by: default avatarNate Case <ncase@xes-inc.com>
Tested-by: default avatarNate Case <ncase@xes-inc.com>
Acked-by: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 07f696c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment