Skip to contentSkip to conversation

drm/exynos: dsi: modify a error type when getting a node failed

PATCH In review Inki Dae 2 participants 2 messages Dec 3, 2015

Subsystems (3)
lore
Share & tools
lore

Inki Dae

author maintainer
#0 lore raw

PATCH 1/1 drm/exynos: dsi: modify a error type when getting a node failed

This patch makes it to return -EINVAL instead of -ENXIO when getting a port or endpoint node failed.

---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +2 -2
index 7c3606a..a24bf8b 100644
@@ -1735,13 +1735,13 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
 
 	ep = of_graph_get_next_endpoint(node, NULL);
 	if (!ep) {
-		ret = -ENXIO;
+		ret = -EINVAL;
 		goto end;
 	}
 
 	dsi->bridge_node = of_graph_get_remote_port_parent(ep);
 	if (!dsi->bridge_node) {
-		ret = -ENXIO;
+		ret = -EINVAL;
 		goto end;
 	}
 end:
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Hello Inki,

Quoted 19 lines · Inki Dae

This patch makes it to return -EINVAL instead of -ENXIO when getting a port or endpoint node failed.

---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +1 -1
index 7c3606a..a24bf8b 100644
@@ -1735,13 +1735,13 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
 
 	ep = of_graph_get_next_endpoint(node, NULL);
 	if (!ep) {
-		ret = -ENXIO;
+		ret = -EINVAL;

drivers/gpu/drm/exynos/exynos_drm_dsi.c static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) · line 1747

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_dsi.c +1 -1
 		goto end;
 	}
 
 	dsi->bridge_node = of_graph_get_remote_port_parent(ep);
 	if (!dsi->bridge_node) {
-		ret = -ENXIO;
+		ret = -EINVAL;
 		goto end;
 	}
 end:

Yes, I also think that -EINVAL is a better error code in this case.

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America