[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200803121904.257261085@linuxfoundation.org>
Date: Mon, 3 Aug 2020 14:18:07 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Pavel Machek <pavel@...x.de>,
Biju Das <biju.das.jz@...renesas.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH 5.7 029/120] drm: of: Fix double-free bug
From: Biju Das <biju.das.jz@...renesas.com>
commit 4ee48cc5586bf519df19894273002aa8ef7b70ad upstream.
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@...x.de>
Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: stable@...r.kernel.org
Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1595502654-40595-1-git-send-email-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/drm_of.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -322,10 +322,8 @@ static int drm_of_lvds_get_remote_pixels
* 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;
Powered by blists - more mailing lists