Skip to contentSkip to conversation

drm: tilcdc: Fix check for remote port parent

PATCH In review Teresa Remmet 2 participants 2 messages Aug 15, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: tilcdc: Fix check for remote port parent

In function tilcdc_get_external_components the check for the remote port parent is not correct. We need a '||' instead of an '&&'.

---
There has been send out a different version of this patch about a year ago. But there was no feedback at all. Please apply one of the solutions.

https://patchwork.kernel.org/patch/6596441/

Teresa

 drivers/gpu/drm/tilcdc/tilcdc_external.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_external.c +1 -1
index 03acb4f..ceba712 100644
@@ -145,7 +145,7 @@ int tilcdc_get_external_components(struct device *dev,
 		struct device_node *node;
 
 		node = of_graph_get_remote_port_parent(ep);
-		if (!node && !of_device_is_available(node)) {
+		if (!node || !of_device_is_available(node)) {
 			of_node_put(node);
 			continue;
 		}
Signature · 1 line
1.9.1
#1 lore raw
Quoted 11 lines · Teresa Remmet

In function tilcdc_get_external_components the check for the remote port parent is not correct. We need a '||' instead of an '&&'.

---
There has been send out a different version of this patch about a year ago. But there was no feedback at all. Please apply one of the solutions.

https://patchwork.kernel.org/patch/6596441/

Oh, I wonder how I lost track of that first fix. I must have forgotten it with some of those rejected BBB audio implementation attempts.

Not really sure if my earlier rewrite is actually any better that this. I'll pick this one up for my next pull request.

Thanks!
Jyri

Quoted 11 lines

Teresa

 drivers/gpu/drm/tilcdc/tilcdc_external.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_external.c +0 -0
index 03acb4f..ceba712 100644

drivers/gpu/drm/tilcdc/tilcdc_external.c int tilcdc_get_external_components(struct device *dev, · line 151

Quoted 8 lines
drivers/gpu/drm/tilcdc/tilcdc_external.c +1 -1
@@ -145,7 +145,7 @@ int tilcdc_get_external_components(struct device *dev,
 		struct device_node *node;
 
 		node = of_graph_get_remote_port_parent(ep);
-		if (!node && !of_device_is_available(node)) {
+		if (!node || !of_device_is_available(node)) {
 			of_node_put(node);
 			continue;
 		}

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel