diff options
author | Baruch Siach <baruch@tkos.co.il> | 2018-02-22 22:22:50 +0300 |
---|---|---|
committer | Archit Taneja <archit@cradlewise.com> | 2018-03-06 11:35:00 +0300 |
commit | 2efa83920c7f4fb214517437c730afdaa4e28391 (patch) | |
tree | 3baa6051830f583eda863ebd314ebb9f24869f38 /drivers/gpu/drm/drm_of.c | |
parent | 3bd07ccd27622d598fd9d87f3032dd457ad62083 (diff) | |
download | linux-2efa83920c7f4fb214517437c730afdaa4e28391.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/drm_of.c')
-rw-r--r-- | drivers/gpu/drm/drm_of.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 4c191c050e7d..1fe122461298 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -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); } |