Skip to contentSkip to conversation

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

PATCH In review Eric Anholt 2 participants 2 messages Jun 15, 2017 – Jun 16, 2017

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

PATCH 1/1 bridge: Fix panel-bridge error return on !panel.

ERR_PTR() needs a negative errno argument.

---
 drivers/gpu/drm/bridge/panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/panel.c +1 -1
index 99f9a4beb859..67fe19e5a9c6 100644
@@ -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);
Signature · 6 lines
2.11.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 1 line · Eric Anholt

ERR_PTR() needs a negative errno argument.

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

Archit

Quoted 20 lines
---
  drivers/gpu/drm/bridge/panel.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/panel.c +1 -1
index 99f9a4beb859..67fe19e5a9c6 100644
@@ -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);
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel