summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo+renesas@jmondi.org>2018-05-31 13:35:03 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-24 15:01:27 -0400
commit09a48f74e4e379af07aef7e2eb48a9be482aa8ff (patch)
tree718d0216d0c66e49adc226ec38b846658fd94d26
parent4adb0a0432f489c5eb802b33dae7737f69e6fd7a (diff)
downloadlinux-09a48f74e4e379af07aef7e2eb48a9be482aa8ff.tar.bz2
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: 01b8444828fc ("media: v4l2: i2c: ov7670: Implement OF mbus configuration") Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--drivers/media/i2c/ov7670.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 3474ef832c1e..31bf577b0bd3 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -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);
+ 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;