Commit 0822315e authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Hans Verkuil

media: i2c: max9286: Fix some redundant of_node_put() calls

This is odd to have a of_node_put() just after a for_each_child_of_node()
or a for_each_endpoint_of_node() loop. It should already be called
during the last iteration.

Remove these calls.

Fixes: 66d8c9d2 ("media: i2c: Add MAX9286 driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarJacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 6966f2f7
...@@ -1449,7 +1449,6 @@ static int max9286_parse_dt(struct max9286_priv *priv) ...@@ -1449,7 +1449,6 @@ static int max9286_parse_dt(struct max9286_priv *priv)
i2c_mux_mask |= BIT(id); i2c_mux_mask |= BIT(id);
} }
of_node_put(node);
of_node_put(i2c_mux); of_node_put(i2c_mux);
/* Parse the endpoints */ /* Parse the endpoints */
...@@ -1513,7 +1512,6 @@ static int max9286_parse_dt(struct max9286_priv *priv) ...@@ -1513,7 +1512,6 @@ static int max9286_parse_dt(struct max9286_priv *priv)
priv->source_mask |= BIT(ep.port); priv->source_mask |= BIT(ep.port);
priv->nsources++; priv->nsources++;
} }
of_node_put(node);
of_property_read_u32(dev->of_node, "maxim,bus-width", &priv->bus_width); of_property_read_u32(dev->of_node, "maxim,bus-width", &priv->bus_width);
switch (priv->bus_width) { switch (priv->bus_width) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment