Skip to contentSkip to conversation

drm/rockchip: inno_hdmi: fix an error code

PATCH Applied Dan Carpenter 3 participants 4 messages Feb 25, 2016 – Apr 22, 2016

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

PATCH 1/1 drm/rockchip: inno_hdmi: fix an error code

We were accidentally returning PTR_ERR(NULL) which means success when we wanted to return a negative error code.

Fixes 412d4ae6b7a5 ('drm/rockchip: hdmi: add Innosilicon HDMI support')
drivers/gpu/drm/rockchip/inno_hdmi.c +2 -1
index 10d62ff..f252441 100644
@@ -855,8 +855,9 @@ static int inno_hdmi_bind(struct device *dev, struct device *master,
 
 	hdmi->ddc = inno_hdmi_i2c_adapter(hdmi);
 	if (IS_ERR(hdmi->ddc)) {
+		ret = PTR_ERR(hdmi->ddc);
 		hdmi->ddc = NULL;
-		return PTR_ERR(hdmi->ddc);
+		return ret;
 	}
 
 	/*
Reviewed-by on v1 1/1
#1 lore raw

Dan,

Quoted 5 lines · Dan Carpenter

We were accidentally returning PTR_ERR(NULL) which means success when we wanted to return a negative error code.

Fixes 412d4ae6b7a5 ('drm/rockchip: hdmi: add Innosilicon HDMI support')

Thanks,
- Yakir

Quoted 18 lines
drivers/gpu/drm/rockchip/inno_hdmi.c +2 -1
index 10d62ff..f252441 100644
@@ -855,8 +855,9 @@ static int inno_hdmi_bind(struct device *dev, struct device *master,
 
  	hdmi->ddc = inno_hdmi_i2c_adapter(hdmi);
  	if (IS_ERR(hdmi->ddc)) {
+		ret = PTR_ERR(hdmi->ddc);
  		hdmi->ddc = NULL;
-		return PTR_ERR(hdmi->ddc);
+		return ret;
  	}
 
  	/*
#2 lore raw
Quoted 9 lines · Yakir Yang

Dan,

Quoted 5 lines · Dan Carpenter

We were accidentally returning PTR_ERR(NULL) which means success when we wanted to return a negative error code.

Fixes 412d4ae6b7a5 ('drm/rockchip: hdmi: add Innosilicon HDMI support')

We still need to apply this.

regards,
dan carpenter

Applied
#3 lore raw
Quoted 7 lines · Dan Carpenter
Quoted 6 lines · Yakir Yang

Dan,

Quoted 3 lines · Dan Carpenter

We were accidentally returning PTR_ERR(NULL) which means success when we wanted to return a negative error code.

Quoted 11 lines
Quoted 3 lines
Quoted 2 lines
Fixes 412d4ae6b7a5 ('drm/rockchip: hdmi: add Innosilicon HDMI support')

We still need to apply this.

regards,
dan carpenter

Oh, Sorry, Miss this patch.

Applied to my drm-fixes.

Thanks.

Signature · 1 line
Mark Yao