]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: rcar_drif: Fix fwnode reference leak when parsing DT
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 11 Aug 2020 20:59:36 +0000 (22:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:21 +0000 (10:07 +0100)
commit23b043e23923d6f8e88f03a8bff02d1f7375e8fb
tree2d387994ab5b23c9e555f784885efc2a50bfab48
parentc78cc511ff688cba50a390089684dc94eb1faaa5
media: rcar_drif: Fix fwnode reference leak when parsing DT

[ Upstream commit cdd4f7824994c9254acc6e415750529ea2d2cfe0 ]

The fwnode reference corresponding to the endpoint is leaked in an error
path of the rcar_drif_parse_subdevs() function. Fix it, and reorganize
fwnode reference handling in the function to release references early,
simplifying error paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/rcar_drif.c