Commit 09a48f74 authored by Jacopo Mondi's avatar Jacopo Mondi Committed by Mauro Carvalho Chehab
Browse files

media: i2c: ov7670: Put ep fwnode after use



The just parsed endpoint fwnode has to be put after use.
Currently this is done only in error handling path. Fix that by
putting node unconditionally after use.

Fixes: 01b84448 ("media: v4l2: i2c: ov7670: Implement OF mbus configuration")

Signed-off-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 4adb0a04
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1744,14 +1744,12 @@ static int ov7670_parse_dt(struct device *dev,
		return -EINVAL;

	ret = v4l2_fwnode_endpoint_parse(ep, &bus_cfg);
	if (ret) {
	fwnode_handle_put(ep);
	if (ret)
		return ret;
	}

	if (bus_cfg.bus_type != V4L2_MBUS_PARALLEL) {
		dev_err(dev, "Unsupported media bus type\n");
		fwnode_handle_put(ep);
		return ret;
	}
	info->mbus_config = bus_cfg.bus.parallel.flags;