提交 4ee48cc5 编写于 作者: B Biju Das 提交者: Sam Ravnborg

drm: of: Fix double-free bug

Fix double-free bug in the error path.

Fixes: 65290075 ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
Reported-by: NPavel Machek <pavel@denx.de>
Signed-off-by: NBiju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1595502654-40595-1-git-send-email-biju.das.jz@bp.renesas.com
上级 f3f90c6d
......@@ -322,10 +322,8 @@ static int drm_of_lvds_get_remote_pixels_type(
* configurations by passing the endpoints explicitly to
* drm_of_lvds_get_dual_link_pixel_order().
*/
if (!current_pt || pixels_type != current_pt) {
of_node_put(remote_port);
if (!current_pt || pixels_type != current_pt)
return -EINVAL;
}
}
return pixels_type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册