]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/video/backlight/lcd.c: call put_device if device_register fails
authorLevente Kurusa <levex@linux.com>
Fri, 3 Jan 2014 03:16:53 +0000 (14:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 6 Jan 2014 09:08:16 +0000 (20:08 +1100)
commitd6788e72ccadca98e28c3f4f9313d642fa27fcab
tree0552ffa0e776ee5c078f758fdb76f5207d2d7f19
parent362caa03f284f5115bccaa722e3663aa4fb1bde3
drivers/video/backlight/lcd.c: call put_device if device_register fails

Currently we kfree the container of the device which failed to register.
This is wrong as the last reference is not given up with a put_device
call.  Also, now that we have put_device() callen, we no longer need the
kfree as the new_ld->dev.release function will take care of kfreeing the
associated memory.

Signed-off-by: Levente Kurusa <levex@linux.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/lcd.c