summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-11-04 20:16:19 +0300
committerHans Verkuil <hverkuil@xs4all.nl>2025-03-06 17:28:29 +0100
commit347d84833faac79a105e438168cedf0b9658445b (patch)
treeae494147908143b0278845c4c3524a3e08c67967 /drivers/media
parent734ac57e47b3bdd140a1119e2c4e8e6f8ef8b33d (diff)
media: xilinx-tpg: fix double put in xtpg_parse_of()
This loop was recently converted to use for_each_of_graph_port() which automatically does __cleanup__ on the "port" iterator variable. Delete the calls to of_node_put(port) to avoid a double put bug. Fixes: 393194cdf11e ("media: xilinx-tpg: use new of_graph functions") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/xilinx/xilinx-tpg.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c
index cb93711ea3e3..7deec6e37edc 100644
--- a/drivers/media/platform/xilinx/xilinx-tpg.c
+++ b/drivers/media/platform/xilinx/xilinx-tpg.c
@@ -722,7 +722,6 @@ static int xtpg_parse_of(struct xtpg_device *xtpg)
format = xvip_of_get_format(port);
if (IS_ERR(format)) {
dev_err(dev, "invalid format in DT");
- of_node_put(port);
return PTR_ERR(format);
}
@@ -731,7 +730,6 @@ static int xtpg_parse_of(struct xtpg_device *xtpg)
xtpg->vip_format = format;
} else if (xtpg->vip_format != format) {
dev_err(dev, "in/out format mismatch in DT");
- of_node_put(port);
return -EINVAL;
}