[U-Boot] [PATCH v2 8/8] rockchip: video: vop: Fix rk_display_init() return error
Eddie Cai
eddie.cai.linux at gmail.com
Tue Apr 18 14:38:08 UTC 2017
2017-04-18 15:09 GMT+08:00 Eric Gao <eric.gao at rock-chips.com>:
> 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 an
> error
> when it return zero rather than return a nonzero value.
>
> Signed-off-by: Eric Gao <eric.gao at rock-chips.com>
> ---
>
> 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 ac9e7db..e8fa177 100644
> --- a/drivers/video/rockchip/rk_vop.c
> +++ b/drivers/video/rockchip/rk_vop.c
> @@ -247,7 +247,7 @@ int rk_display_init(struct udevice *dev, ulong fbbase,
> int ep_node)
> ret = clk_get_by_index(dev, 1, &clk);
> if (!ret)
> ret = clk_set_rate(&clk, timing.pixelclock.typ);
> - if (ret) {
> + if (!ret) {
> debug("%s: Failed to set pixel clock: ret=%d\n", __func__,
> ret);
> return ret;
> }
>
should be
ret = clk_get_by_index(dev, 1, &clk);
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;
}
}
> --
> 1.9.1
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
More information about the U-Boot
mailing list