diff options
author | Chris Zhong <zyw@rock-chips.com> | 2017-03-08 05:27:55 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-03-13 22:59:10 +0300 |
commit | a68b5bb6708e73d58b30680421df8166898e5cfc (patch) | |
tree | 66ff0685a33af66a3cba47b39b1afe87e870fdbf /drivers/gpu/drm/rockchip/cdn-dp-reg.h | |
parent | a45216547e8925078b18b2a6b539100c3814e973 (diff) | |
download | linux-a68b5bb6708e73d58b30680421df8166898e5cfc.tar.xz |
drm/rockchip: cdn-dp: return error code when clk_get_rate failed
The clk_get_rate return 0 if something goes wrong, so it can never be
less then zero, the ret should be set a error code, otherwise the
cdn_dp_clk_enable will return 0 when it failed at clk_get_rate.
In addition, clk_get_rate() returns an "unsigned long", so use
"unsigned long" instead of "u32" is better.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1488940077-22297-2-git-send-email-zyw@rock-chips.com
Diffstat (limited to 'drivers/gpu/drm/rockchip/cdn-dp-reg.h')
-rw-r--r-- | drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.h b/drivers/gpu/drm/rockchip/cdn-dp-reg.h index b5f215324694..3507be3e0e12 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.h +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.h @@ -462,7 +462,7 @@ enum vic_bt_type { void cdn_dp_clock_reset(struct cdn_dp_device *dp); -void cdn_dp_set_fw_clk(struct cdn_dp_device *dp, u32 clk); +void cdn_dp_set_fw_clk(struct cdn_dp_device *dp, unsigned long clk); int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem, u32 i_size, const u32 *d_mem, u32 d_size); int cdn_dp_set_firmware_active(struct cdn_dp_device *dp, bool enable); |