Skip to content

Commit 347d848

Browse files
Dan Carpenterhverkuil
authored andcommitted
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: 393194c ("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>
1 parent 734ac57 commit 347d848

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/media/platform/xilinx/xilinx-tpg.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,6 @@ static int xtpg_parse_of(struct xtpg_device *xtpg)
722722
format = xvip_of_get_format(port);
723723
if (IS_ERR(format)) {
724724
dev_err(dev, "invalid format in DT");
725-
of_node_put(port);
726725
return PTR_ERR(format);
727726
}
728727

@@ -731,7 +730,6 @@ static int xtpg_parse_of(struct xtpg_device *xtpg)
731730
xtpg->vip_format = format;
732731
} else if (xtpg->vip_format != format) {
733732
dev_err(dev, "in/out format mismatch in DT");
734-
of_node_put(port);
735733
return -EINVAL;
736734
}
737735

0 commit comments

Comments
 (0)