From: Dan Carpenter Date: Thu, 25 Feb 2016 21:30:29 +0000 (+0300) Subject: drm/rockchip: inno_hdmi: fix an error code X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2743becb3338cf012dbe7b70c6c39bbac81cc101;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; } /*