The bridge and ret variables are per-iteration variables, whose values
don't have to be carried to the next iteration or be used after the loop
end. Move their declaration inside the loop scope as a cleanup and to make
code clearer.
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Link: https://patch.msgid.link/20260407-drm-lcdif-dbanc-v4-4-247a16e61ef9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
{
struct device *dev = lcdif->drm->dev;
struct device_node *ep __free(device_node) = NULL;
- struct drm_bridge *bridge;
- int ret;
for_each_endpoint_of_node(dev->of_node, ep) {
struct device_node *remote __free(device_node) =
of_graph_get_remote_port_parent(ep);
struct of_endpoint of_ep;
+ struct drm_bridge *bridge;
struct drm_encoder *encoder;
+ int ret;
if (!of_device_is_available(remote))
continue;