Commit 2efa8392 authored by Baruch Siach's avatar Baruch Siach Committed by Archit Taneja

drm: of: simplify component probe code

Use positive logic for better readability. This also eliminates one
of_node_put() call, making the code shorter.
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Tested-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarArchit Taneja <archit@cradlewise.com>
Link: https://patchwork.freedesktop.org/patch/msgid/61c56895d44117d80e7d82f04e729e29c60fadbd.1519327370.git.baruch@tkos.co.il
parent 3bd07ccd
...@@ -122,12 +122,10 @@ int drm_of_component_probe(struct device *dev, ...@@ -122,12 +122,10 @@ int drm_of_component_probe(struct device *dev,
if (!port) if (!port)
break; break;
if (!of_device_is_available(port->parent)) { if (of_device_is_available(port->parent))
of_node_put(port); drm_of_component_match_add(dev, &match, compare_of,
continue; port);
}
drm_of_component_match_add(dev, &match, compare_of, port);
of_node_put(port); of_node_put(port);
} }
......
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