[U-Boot] [PATCH v7 3/9] rockchip: video: vop: Fix rk_display_init() return error

Eric Gao eric.gao at rock-chips.com
Tue May 2 08:19:44 UTC 2017


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 at rock-chips.com>

---

Changes in v7:
-Using IS_ERR_VALUE to check the clk_set_rate' return value.

Changes in v6: None
Changes in v5:
-Drop previous change, and modify clk_set_rate implement in rk3399.

Changes in v4:
-Move this patch to an early stage.

Changes in v3:
-Improve indentation relationship

Changes in v2:
-Fix rk_display_init() function report error(err:-19).

 drivers/video/rockchip/rk_vop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
1.9.1




More information about the U-Boot mailing list