aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBiju Das <[email protected]>2020-07-23 12:10:54 +0100
committerSam Ravnborg <[email protected]>2020-07-26 18:04:06 +0200
commit4ee48cc5586bf519df19894273002aa8ef7b70ad (patch)
tree7df7f5c36aa48ced5c9c2b5716d20b25aa6ae9f6
parentf3f90c6db188d437add55aaffadd5ad5bcb8cda6 (diff)
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 <[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]
-rw-r--r--drivers/gpu/drm/drm_of.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index b50b44e76279..8fc3f67e3e76 100644
--- 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_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;