backlight: core: Replace kfree with put_device
authorLevente Kurusa <levex@linux.com>
Fri, 7 Feb 2014 08:43:21 +0000 (09:43 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 8 Apr 2014 12:20:39 +0000 (13:20 +0100)
commit35762a47c0a24072a689cbd98ecf8c62b037ef8a
tree5c77d93917fd60eb2fb3b0b4f9a3c3fb5d9d4383
parentfa389e220254c69ffae0d403eac4146171062d08
backlight: core: Replace kfree with put_device

As per the comments on device_register, we shouldn't call kfree()
right after a device_register() failure. Instead call put_device(),
which in turn will call bl_device_release resulting in a kfree to the
full structure.

Signed-off-by: Levente Kurusa <levex@linux.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/backlight.c