Skip to contentSkip to conversation

drm/arm: mali-dp: Fix error return code in malidp_bind()

PATCH Applied Wei Yongjun 3 participants 3 messages Jul 28, 2016

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

PATCH 1/1 drm/arm: mali-dp: Fix error return code in malidp_bind()

Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function.

Fixes 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port

instead of the endpoint')

---
 drivers/gpu/drm/arm/malidp_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_drv.c +3 -1
index 4e61ea5..44b24cb 100644
@@ -362,8 +362,10 @@ static int malidp_bind(struct device *dev)
 
 	/* Set the CRTC's port so that the encoder component can find it */
 	ep = of_graph_get_next_endpoint(dev->of_node, NULL);
-	if (!ep)
+	if (!ep) {
+		ret = -EINVAL;
 		goto port_fail;
+	}
 	malidp->crtc.port = of_get_next_parent(ep);
 
 	ret = component_bind_all(dev, drm);
Acked-by on v1 1/1
#1 lore raw

Hi Wei,

Quoted 7 lines · Wei Yongjun

Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function.

Fixes 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port

instead of the endpoint')

---

Thanks for cleaning up after me! :-)

@Sean, can you pick this up on top of 3c31760e760c?

Cheers,
Brian

Quoted 10 lines

drivers/gpu/drm/arm/malidp_drv.c | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_drv.c +0 -0
index 4e61ea5..44b24cb 100644
@@ -362,8 +362,10 @@ static int malidp_bind(struct device *dev)
 

drivers/gpu/drm/arm/malidp_drv.c static int malidp_bind(struct device *dev) · line 371

Quoted 10 lines
drivers/gpu/drm/arm/malidp_drv.c +3 -1
 	/* Set the CRTC's port so that the encoder component can find it */
 	ep = of_graph_get_next_endpoint(dev->of_node, NULL);
-	if (!ep)
+	if (!ep) {
+		ret = -EINVAL;
 		goto port_fail;
+	}
 	malidp->crtc.port = of_get_next_parent(ep);
 
 	ret = component_bind_all(dev, drm);

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

#2 lore raw
Quoted 6 lines · Brian Starkey

Hi Wei,

Quoted 3 lines · Wei Yongjun

Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function.

Quoted 8 lines
Quoted 4 lines
Fixes 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port

instead of the endpoint')

---

Thanks for cleaning up after me! :-)

Applied to drm-misc, thanks.
-Daniel

Quoted 30 lines

@Sean, can you pick this up on top of 3c31760e760c?

Cheers,
Brian

Quoted 10 lines

drivers/gpu/drm/arm/malidp_drv.c | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_drv.c +0 -0
index 4e61ea5..44b24cb 100644
@@ -362,8 +362,10 @@ static int malidp_bind(struct device *dev)
 

drivers/gpu/drm/arm/malidp_drv.c static int malidp_bind(struct device *dev) · line 371

Quoted 10 lines
drivers/gpu/drm/arm/malidp_drv.c +3 -1
 	/* Set the CRTC's port so that the encoder component can find it */
 	ep = of_graph_get_next_endpoint(dev->of_node, NULL);
-	if (!ep)
+	if (!ep) {
+		ret = -EINVAL;
 		goto port_fail;
+	}
 	malidp->crtc.port = of_get_next_parent(ep);
 
 	ret = component_bind_all(dev, drm);

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

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch