mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
backlight: sky81452-backlight: Fix refcount imbalance on error
[ Upstream commitb7a4f80bc3] When of_property_read_u32_array() returns an error code, a pairing refcount decrement is needed to keep np's refcount balanced. Fixes:f705806c9f("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
517f0785ce
commit
f87f0236bd
@@ -196,6 +196,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
|
||||
num_entry);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "led-sources node is invalid.\n");
|
||||
of_node_put(np);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user