]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf...
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 19 May 2021 13:49:28 +0000 (21:49 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 28 May 2021 17:44:34 +0000 (19:44 +0200)
After calling clk_prepare_enable(), clk_disable_unprepare() need
be called when calling regmap_write() failed.

Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210519134928.2696617-1-yangyingliang@huawei.com
drivers/gpu/drm/rockchip/cdn-dp-core.c

index a4a45daf93f2b322e2eb455e0dcc7e0194ffbbd7..6802d9b65f828a266e75dede349e196402e82bb3 100644 (file)
@@ -73,6 +73,7 @@ static int cdn_dp_grf_write(struct cdn_dp_device *dp,
        ret = regmap_write(dp->grf, reg, val);
        if (ret) {
                DRM_DEV_ERROR(dp->dev, "Could not write to GRF: %d\n", ret);
+               clk_disable_unprepare(dp->grf_clk);
                return ret;
        }