mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-08 17:49:45 +00:00
drm/of: free the right object
[ Upstream commitb557a5f8da
] There is no need to free a NULL value. Instead, free the object that is leaking due to the iterator. The semantic patch that finds this problem is as follows: // <smpl> @@ expression x,e; identifier f; @@ x = f(...); if (x == NULL) { ... when any when != x = e * of_node_put(x); ... } // </smpl> Fixes:6529007522
("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210709200717.3676376-1-Julia.Lawall@inria.fr Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
38235f195d
commit
56e5c527cc
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ static int drm_of_lvds_get_remote_pixels_type(
|
|||
|
||||
remote_port = of_graph_get_remote_port(endpoint);
|
||||
if (!remote_port) {
|
||||
of_node_put(remote_port);
|
||||
of_node_put(endpoint);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue