Skip to content

Commit 2c0e02f

Browse files
dinghaoliugregkh
authored andcommitted
backlight: sky81452-backlight: Fix refcount imbalance on error
[ 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>
1 parent cd0fdb5 commit 2c0e02f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/video/backlight/sky81452-backlight.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
217217
num_entry);
218218
if (ret < 0) {
219219
dev_err(dev, "led-sources node is invalid.\n");
220+
of_node_put(np);
220221
return ERR_PTR(-EINVAL);
221222
}
222223

0 commit comments

Comments
 (0)