drm/armada: no need to check parent of remote
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 24 Jan 2019 14:18:17 +0000 (14:18 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 28 Jun 2019 13:50:07 +0000 (14:50 +0100)
There's no need to check the parent of the remote device to check
whether it is available or not, the remote is the device itself.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/armada/armada_drv.c

index 1cfabcd6a629d68ec586fdc9a9ef8d9841d39178..f1729398b1bd9a460f859a6aaaf7322d71f2ad81 100644 (file)
@@ -210,17 +210,9 @@ static void armada_add_endpoints(struct device *dev,
 
        for_each_endpoint_of_node(dev_node, ep) {
                remote = of_graph_get_remote_port_parent(ep);
-               if (!remote || !of_device_is_available(remote)) {
-                       of_node_put(remote);
-                       continue;
-               } else if (!of_device_is_available(remote->parent)) {
-                       dev_warn(dev, "parent device of %pOF is not available\n",
-                                remote);
-                       of_node_put(remote);
-                       continue;
-               }
-
-               drm_of_component_match_add(dev, match, compare_of, remote);
+               if (remote && of_device_is_available(remote))
+                       drm_of_component_match_add(dev, match, compare_of,
+                                                  remote);
                of_node_put(remote);
        }
 }