Skip to content

Commit 4ee48cc

Browse files
bijudassravnborg
authored andcommitted
drm: of: Fix double-free bug
Fix double-free bug in the error path. Fixes: 6529007 ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Reported-by: Pavel Machek <[email protected]> Signed-off-by: Biju Das <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Cc: [email protected] Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f3f90c6 commit 4ee48cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/drm_of.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,8 @@ static int drm_of_lvds_get_remote_pixels_type(
322322
* configurations by passing the endpoints explicitly to
323323
* drm_of_lvds_get_dual_link_pixel_order().
324324
*/
325-
if (!current_pt || pixels_type != current_pt) {
326-
of_node_put(remote_port);
325+
if (!current_pt || pixels_type != current_pt)
327326
return -EINVAL;
328-
}
329327
}
330328

331329
return pixels_type;

0 commit comments

Comments
 (0)