linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] drm/rockchip: inno_hdmi: fix an error code
@ 2016-02-25 21:30 Dan Carpenter
  2016-02-26  6:26 ` Yakir Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2016-02-25 21:30 UTC (permalink / raw)
  To: Mark Yao, Yakir Yang; +Cc: linux-rockchip, kernel-janitors, dri-devel

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 10d62ff..f252441 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -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;
 	}
 
 	/*
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-22  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 21:30 [patch] drm/rockchip: inno_hdmi: fix an error code Dan Carpenter
2016-02-26  6:26 ` Yakir Yang
2016-04-21 14:03   ` Dan Carpenter
2016-04-22  0:41     ` Mark yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).