Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 66d8c9d2422d ("media: i2c: Add MAX9286 driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Christophe JAILLET and committed by
Hans Verkuil
0822315e 6966f2f7

-2
-2
drivers/media/i2c/max9286.c
··· 1449 1449 1450 1450 i2c_mux_mask |= BIT(id); 1451 1451 } 1452 - of_node_put(node); 1453 1452 of_node_put(i2c_mux); 1454 1453 1455 1454 /* Parse the endpoints */ ··· 1512 1513 priv->source_mask |= BIT(ep.port); 1513 1514 priv->nsources++; 1514 1515 } 1515 - of_node_put(node); 1516 1516 1517 1517 of_property_read_u32(dev->of_node, "maxim,bus-width", &priv->bus_width); 1518 1518 switch (priv->bus_width) {