Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4329b93b authored by Philipp Zabel's avatar Philipp Zabel
Browse files

of: Reduce indentation in of_graph_get_next_endpoint



A 'return endpoint;' at the end of the (!prev) case allows to
reduce the indentation level of the (prev) case.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
parent 6ff60d39
Loading
Loading
Loading
Loading
+22 −20
Original line number Diff line number Diff line
@@ -2026,7 +2026,10 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
			pr_err("%s(): no endpoint nodes specified for %s\n",
			       __func__, parent->full_name);
		of_node_put(node);
	} else {

		return endpoint;
	}

	port = of_get_parent(prev);
	if (WARN_ONCE(!port, "%s(): endpoint %s has no parent node\n",
		      __func__, prev->full_name))
@@ -2050,7 +2053,6 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
	/* Pick up the first endpoint in this port. */
	endpoint = of_get_next_child(port, NULL);
	of_node_put(port);
	}

	return endpoint;
}