diff options
author | Eric Gao <eric.gao@rock-chips.com> | 2017-05-02 18:23:51 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-05-10 13:37:22 -0600 |
commit | e07e5bde7c2386172994035603d5e2781cdf3bda (patch) | |
tree | 6550d24877f04a0cbe8cbadd0b262b367aa2bc3b /drivers/video/rockchip/rk_vop.c | |
parent | 1c3984041ce39ac9fe5ed24fca49cb2c17dc156a (diff) | |
download | u-boot-e07e5bde7c2386172994035603d5e2781cdf3bda.zip u-boot-e07e5bde7c2386172994035603d5e2781cdf3bda.tar.gz u-boot-e07e5bde7c2386172994035603d5e2781cdf3bda.tar.bz2 |
rockchip: video: vop: Fix rk_display_init() return error
It's caused by the difference of clk_set_rate function implement between
rk3288 andd rk3399.
clk_set_rate() of rk3288 return 0 in normal condition.
clk_set_rate() of rk3399 return input parameter in normal condition.
So check clk_set_rate's return value by IS_ERR_VALUE.
Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Diffstat (limited to 'drivers/video/rockchip/rk_vop.c')
-rw-r--r-- | drivers/video/rockchip/rk_vop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index bc02f80..c12c24b 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -244,7 +244,7 @@ int rk_display_init(struct udevice *dev, ulong fbbase, ret = clk_get_by_index(dev, 1, &clk); if (!ret) ret = clk_set_rate(&clk, timing.pixelclock.typ); - if (ret) { + if (IS_ERR_VALUE(ret)) { debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret); return ret; } |