Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: of: Fix double-free bug

Fix double-free bug in the error path.

Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1595502654-40595-1-git-send-email-biju.das.jz@bp.renesas.com

authored by

Biju Das and committed by
Sam Ravnborg
4ee48cc5 f3f90c6d

+1 -3
+1 -3
drivers/gpu/drm/drm_of.c
··· 322 322 * configurations by passing the endpoints explicitly to 323 323 * drm_of_lvds_get_dual_link_pixel_order(). 324 324 */ 325 - if (!current_pt || pixels_type != current_pt) { 326 - of_node_put(remote_port); 325 + if (!current_pt || pixels_type != current_pt) 327 326 return -EINVAL; 328 - } 329 327 } 330 328 331 329 return pixels_type;