]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/msm/dpu: tidy up some error checking
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 6 Jun 2023 08:33:03 +0000 (11:33 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 7 Jun 2023 23:27:46 +0000 (02:27 +0300)
commite7a2cf8e058e24218067694113938726db8696c9
treecccd15888b6636fe4baaa1338e4e69adfc751d3a
parent203b2019b3acc4ec851ba0461f1b30a3fd4449f5
drm/msm/dpu: tidy up some error checking

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@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/541225/
Link: https://lore.kernel.org/r/ZH7vP2Swu8CYpgUL@moroto
[DB: fixed debug message]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c