backlight: sky81452-backlight: Fix refcount imbalance on error
authordinghao.liu@zju.edu.cn <dinghao.liu@zju.edu.cn>
Thu, 20 Aug 2020 06:38:17 +0000 (14:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:07:04 +0000 (09:07 +0100)
commit6630474d70c0c3cb80ad480b4bf0c813dbc4e9db
tree6c7fb472d868c617477e3dc0b5d7620be66252fc
parentca27f1e37747814d27c530285da7e84161da5ede
backlight: sky81452-backlight: Fix refcount imbalance on error

[ Upstream commit b7a4f80bc316a56d6ec8750e93e66f42431ed960 ]

When of_property_read_u32_array() returns an error code, a
pairing refcount decrement is needed to keep np's refcount
balanced.

Fixes: f705806c9f355 ("backlight: Add support Skyworks SKY81452 backlight driver")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/backlight/sky81452-backlight.c