bridge: Fix panel-bridge error return on !panel.
diff mbox

Message ID 20170615175423.17954-1-eric@anholt.net
State New
Headers show

Commit Message

Eric Anholt June 15, 2017, 5:54 p.m. UTC
ERR_PTR() needs a negative errno argument.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/bridge/panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Archit Taneja June 16, 2017, 6:02 a.m. UTC | #1
On 06/15/2017 11:24 PM, Eric Anholt wrote:
> ERR_PTR() needs a negative errno argument.

Thanks, I'll queue it to drm-misc-next-fixes once it's opened.

Archit

> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>   drivers/gpu/drm/bridge/panel.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
> index 99f9a4beb859..67fe19e5a9c6 100644
> --- a/drivers/gpu/drm/bridge/panel.c
> +++ b/drivers/gpu/drm/bridge/panel.c
> @@ -161,7 +161,7 @@ struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
>   	int ret;
>   
>   	if (!panel)
> -		return ERR_PTR(EINVAL);
> +		return ERR_PTR(-EINVAL);
>   
>   	panel_bridge = devm_kzalloc(panel->dev, sizeof(*panel_bridge),
>   				    GFP_KERNEL);
>

Patch
diff mbox

diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 99f9a4beb859..67fe19e5a9c6 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -161,7 +161,7 @@  struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
 	int ret;
 
 	if (!panel)
-		return ERR_PTR(EINVAL);
+		return ERR_PTR(-EINVAL);
 
 	panel_bridge = devm_kzalloc(panel->dev, sizeof(*panel_bridge),
 				    GFP_KERNEL);