gpu: ipu-v3: fix refcount leak in ipu_add_client_devices()
Subsystems (2)
PATCH 1/1 gpu: ipu-v3: fix refcount leak in ipu_add_client_devices()
The node returned by of_graph_get_port_by_id() with refcount incremented, of_node_put() needs be called when finish using it. So add it in the error path in ipu_add_client_devices().
Fixes 17e052175039 ("gpu: ipu-v3: Do not bail out on missing optional port nodes")
Signed-off-by Wang Yufen <[email protected]>
--- drivers/gpu/ipu-v3/ipu-common.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/ipu-v3/ipu-common.c +1 -0
@@ -1164,6 +1164,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) pdev =platform_device_alloc (reg->name, id++);if (!pdev) { +of_node_put (of_node); ret = -ENOMEM ; goto err_register; }
Signature · 1 line
1.8.3.1