[U-Boot] [PATCH v3 11/11] rockchip: video: vop: Fix rk_display_init() return error
Eric Gao
eric.gao at rock-chips.com
Wed Apr 19 12:39:50 UTC 2017
The function clk_set_rate() will return it's input parameter, so it's return
value in normal condition is nonzero. In this case, we should report error
when it return zero rather than return a nonzero value.
Signed-off-by: Eric Gao <eric.gao at rock-chips.com>
-Fix rk_display_init() function report error(err:-19).
---
Changes in v3:
-Improve indentation relationship
Changes in v2: None
drivers/video/rockchip/rk_vop.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index ac9e7db..bd80b1b 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -245,13 +245,13 @@ int rk_display_init(struct udevice *dev, ulong fbbase, int ep_node)
}
ret = clk_get_by_index(dev, 1, &clk);
- if (!ret)
+ if (!ret) {
ret = clk_set_rate(&clk, timing.pixelclock.typ);
- if (ret) {
- debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret);
- return ret;
+ if (!ret) {
+ debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret);
+ return ret;
+ }
}
-
/* Set bitwidth for vop display according to vop mode */
switch (vop_id) {
case VOP_MODE_EDP:
--
1.9.1
More information about the U-Boot
mailing list