2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

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: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Archit Taneja <archit@cradlewise.com>
Link: https://patchwork.freedesktop.org/patch/msgid/61c56895d44117d80e7d82f04e729e29c60fadbd.1519327370.git.baruch@tkos.co.il
This commit is contained in:
Baruch Siach 2018-02-22 21:22:50 +02:00 committed by Archit Taneja
parent 3bd07ccd27
commit 2efa83920c

View File

@ -122,12 +122,10 @@ int drm_of_component_probe(struct device *dev,
if (!port)
break;
if (!of_device_is_available(port->parent)) {
of_node_put(port);
continue;
}
if (of_device_is_available(port->parent))
drm_of_component_match_add(dev, &match, compare_of,
port);
drm_of_component_match_add(dev, &match, compare_of, port);
of_node_put(port);
}