Commit 025e3d97 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Baryshkov

drm/msm/dpu: clean up dpu_kms_get_clk_rate() returns

Static analysis tools complain about the -EINVAL error code being
stored in an unsigned variable.  Let's change this to match
the clk_get_rate() function which is type unsigned long and returns
zero on error.

Fixes: 25fdd593 ("drm/msm: Add SDM845 DPU support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/539626/
Link: https://lore.kernel.org/r/28644c5e-950e-41cd-8389-67f37b067bdc@kili.mountainSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 997ed53d
......@@ -1023,13 +1023,13 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms)
return 0;
}
u64 dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name)
unsigned long dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name)
{
struct clk *clk;
clk = msm_clk_bulk_get_clock(dpu_kms->clocks, dpu_kms->num_clocks, clock_name);
if (!clk)
return -EINVAL;
return 0;
return clk_get_rate(clk);
}
......
......@@ -205,6 +205,6 @@ void dpu_disable_vblank(struct msm_kms *kms, struct drm_crtc *crtc);
*
* Return: current clock rate
*/
u64 dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name);
unsigned long dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name);
#endif /* __dpu_kms_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment