diff options
author | Colin Ian King | 2018-08-21 13:55:19 +0200 |
---|---|---|
committer | Rob Clark | 2018-10-04 02:24:54 +0200 |
commit | dfdb3be43ef1195c491e6c3760b922acb52e3575 (patch) | |
tree | 3894b00903746fbcb34fe77db254d086105038f0 /drivers/gpu/drm/msm/disp/dpu1 | |
parent | drm/msm/a6xx: Fix PDC register overlap (diff) | |
download | kernel-qcow2-linux-dfdb3be43ef1195c491e6c3760b922acb52e3575.tar.gz kernel-qcow2-linux-dfdb3be43ef1195c491e6c3760b922acb52e3575.tar.xz kernel-qcow2-linux-dfdb3be43ef1195c491e6c3760b922acb52e3575.zip |
drm/msm: fix unsigned comparison with less than zero
The return from the call to _mixer_stages can be a negative error
code however this is being assigned to an unsigned variable 'stages'
hence the check is always false. Fix this by making 'stages' an
int.
Detected by Coccinelle ("Unsigned expression compared with zero:
stages < 0")
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/disp/dpu1')
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c index b394a1818c5d..eec1051f2afc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -297,7 +297,7 @@ static void dpu_hw_ctl_setup_blendstage(struct dpu_hw_ctl *ctx, u32 mixercfg = 0, mixercfg_ext = 0, mix, ext; u32 mixercfg_ext2 = 0, mixercfg_ext3 = 0; int i, j; - u8 stages; + int stages; int pipes_per_stage; stages = _mixer_stages(ctx->mixer_hw_caps, ctx->mixer_count, lm); |