[PATCH] drm/msm/dpu: tidy up some error checking
Abhinav Kumar
quic_abhinavk at quicinc.com
Tue Jun 6 20:18:58 UTC 2023
On 6/6/2023 1:33 AM, Dan Carpenter wrote:
> The "vsync_hz" variable is unsigned int so it can't be less
> than zero. The dpu_kms_get_clk_rate() function used to return a u64
> but I previously changed it to return an unsigned long and zero on
> error so it matches clk_get_rate().
>
> Change the "vsync_hz" type to unsigned long as well and change the
> error checking to check for zero instead of negatives. This change
> does not affect runtime at all. It's just a clean up.
>
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> ---
Reviewed-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
More information about the dri-devel
mailing list