You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/omap: dss: Fix refcount leak bugs
[ Upstream commit8b42057e62] In dss_init_ports() and __dss_uninit_ports(), we should call of_node_put() for the reference returned by of_graph_get_port_by_id() in fail path or when it is not used anymore. Fixes:09bffa6e51("drm: omap: use common OF graph helpers") Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220722144348.1306569-1-windhl@126.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cbe37857dd
commit
1f340e1c1c
@@ -1173,6 +1173,7 @@ static void __dss_uninit_ports(struct dss_device *dss, unsigned int num_ports)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
of_node_put(port);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1205,11 +1206,13 @@ static int dss_init_ports(struct dss_device *dss)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
of_node_put(port);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
of_node_put(port);
|
||||
__dss_uninit_ports(dss, i);
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user