drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 19 Jul 2016 11:32:43 +0000 (11:32 +0000)
committerSean Paul <seanpaul@chromium.org>
Tue, 19 Jul 2016 20:36:48 +0000 (16:36 -0400)
Add the missing clk_disable_unprepare() before return in the
error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c

index e81e19a660adcbd10736a01ab89934c4b06e0bae..89aadbf465f8563cdefb8174ff5cfca608876d09 100644 (file)
@@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data)
        ret = rockchip_dp_pre_init(dp);
        if (ret < 0) {
                dev_err(dp->dev, "failed to dp pre init %d\n", ret);
+               clk_disable_unprepare(dp->pclk);
                return ret;
        }
 
@@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
        ret = rockchip_dp_pre_init(dp);
        if (ret < 0) {
                dev_err(dp->dev, "failed to pre init %d\n", ret);
+               clk_disable_unprepare(dp->pclk);
                return ret;
        }