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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 10 Sep 2020 12:26:43 +0000 (14:26 +0200)
commitcdd4f7824994c9254acc6e415750529ea2d2cfe0
treea7b223f1e66e39bdbedcb1a4ca3422adc9f1c6fb
parent6c11631480e9a0554ae5ee89dc12acaa1f1a93a0
media: rcar_drif: Fix fwnode reference leak when parsing DT

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>
drivers/media/platform/rcar_drif.c