diff mbox

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

Message ID 1449121541-4693-1-git-send-email-inki.dae@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Inki Dae Dec. 3, 2015, 5:45 a.m. UTC
This patch makes it to return -EINVAL instead of -ENXIO
when getting a port or endpoint node failed.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Javier Martinez Canillas Dec. 3, 2015, 1:18 p.m. UTC | #1
Hello Inki,

On 12/03/2015 02:45 AM, Inki Dae wrote:
> This patch makes it to return -EINVAL instead of -ENXIO
> when getting a port or endpoint node failed.
> 
> Signed-off-by: Inki Dae <inki.dae@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 7c3606a..a24bf8b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -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:
> 

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

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 7c3606a..a24bf8b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -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: