Skip to content

Commit

Permalink
backlight: sky81452-backlight: Fix refcount imbalance on error
Browse files Browse the repository at this point in the history
[ Upstream commit b7a4f80 ]

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

Fixes: f705806 ("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>
  • Loading branch information
dinghaoliu authored and gregkh committed Oct 29, 2020
1 parent 517f078 commit f87f023
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/backlight/sky81452-backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f87f023

Please sign in to comment.