Commit b7a4f80b authored by dinghao.liu@zju.edu.cn's avatar dinghao.liu@zju.edu.cn Committed by Lee Jones

backlight: sky81452-backlight: Fix refcount imbalance on error

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

Fixes: f705806c ("backlight: Add support Skyworks SKY81452 backlight driver")
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 9123e3a7
...@@ -217,6 +217,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt( ...@@ -217,6 +217,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
num_entry); num_entry);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "led-sources node is invalid.\n"); dev_err(dev, "led-sources node is invalid.\n");
of_node_put(np);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment