summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7604.c
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@opentech.at>2018-06-01 11:21:32 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-06-28 12:48:52 +0200
commite32eb0d8a6cdc965347b964e45e40c9254bd7408 (patch)
tree46bdfc5e03d9a16fbfa3428840e407f8e6dae716 /drivers/media/i2c/adv7604.c
parentmedia: v4l: omap: add VIDEO_V4L2 dependency (diff)
downloadlinux-e32eb0d8a6cdc965347b964e45e40c9254bd7408.tar.xz
linux-e32eb0d8a6cdc965347b964e45e40c9254bd7408.zip
media: adv7604: simplify of_node_put()
As the of_node_put() is unconditional here there is no need to have it twice. Signed-off-by: Nicholas Mc Guire <hofrat@opentech.at> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/adv7604.c')
-rw-r--r--drivers/media/i2c/adv7604.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index cac2081e876e..1a3b2c04d9f9 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -3108,12 +3108,9 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
return -EINVAL;
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg);
- if (ret) {
- of_node_put(endpoint);
- return ret;
- }
-
of_node_put(endpoint);
+ if (ret)
+ return ret;
if (!of_property_read_u32(np, "default-input", &v))
state->pdata.default_input = v;