From 2743becb3338cf012dbe7b70c6c39bbac81cc101 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 26 Feb 2016 00:30:29 +0300 Subject: [PATCH] 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') Signed-off-by: Dan Carpenter Reviewed-by: Yakir Yang --- drivers/gpu/drm/rockchip/inno_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 10d62fff22f1..f25244199626 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; } /* -- 2.20.1