projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38235f1
)
drm/of: free the right object
author
Julia Lawall
<Julia.Lawall@inria.fr>
Fri, 9 Jul 2021 20:07:17 +0000
(22:07 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:31 +0000
(09:50 +0200)
[ Upstream commit
b557a5f8da5798d27370ed6b73e673aae33efd55
]
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:
6529007522de
("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>
drivers/gpu/drm/drm_of.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_of.c
b/drivers/gpu/drm/drm_of.c
index ca04c34e8251863d19324e4eb063616ba18034c1..197c574773444624ebc8cd149a678bfbf2370979 100644
(file)
--- a/
drivers/gpu/drm/drm_of.c
+++ b/
drivers/gpu/drm/drm_of.c
@@
-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_por
t);
+ of_node_put(
endpoin
t);
return -EPIPE;
}