backlight: adp5520: Fix error handling in adp5520_bl_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 8 Jul 2016 22:19:51 +0000 (01:19 +0300)
committerLee Jones <lee.jones@linaro.org>
Wed, 4 Jan 2017 11:37:31 +0000 (11:37 +0000)
commit0eb3fba8c68275f0122f65f7316efaaf86448016
tree5d46ec3cd8c23a385d8784bf053ed1e6f310c22c
parentcc21942bce652d1a92dae85b785378256e1df1f7
backlight: adp5520: Fix error handling in adp5520_bl_probe()

If adp5520_bl_setup() fails, sysfs group left unremoved.

By the way, fix overcomplicated assignement of error code.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/adp5520_bl.c