Skip to content

Commit b7a4f80

Browse files
dinghaoliuLee Jones
authored andcommitted
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: f705806 ("backlight: Add support Skyworks SKY81452 backlight driver") Signed-off-by: Dinghao Liu <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 9123e3a commit b7a4f80

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)