diff options
author | Ye Li <ye.li@nxp.com> | 2020-08-04 00:46:44 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-08-04 03:17:17 -0700 |
commit | 505c38e8c10a8a588c9cea133f6291b2954889a6 (patch) | |
tree | 0ac8a26fd1cdedda123ffd82c9ecea12e061a7e3 /drivers | |
parent | 7e8cd5921aec1a3ad4e65773c108e5a798ee724b (diff) |
LF-1834 video: imxdpuv1: Fix potential overflow
Fix coverity issue 264938. In imxdpuv1_disp_force_shadow_load,
potentially overflowing expression 1 << i with type int
(32 bits, signed) is evaluated using 32-bit arithmetic, and then
used in a context that expects an expression of type uint64_t.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/imx/imxdpuv1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/imx/imxdpuv1.c b/drivers/video/imx/imxdpuv1.c index 971ff16bc75..26025e1453a 100644 --- a/drivers/video/imx/imxdpuv1.c +++ b/drivers/video/imx/imxdpuv1.c @@ -3815,7 +3815,7 @@ int imxdpuv1_disp_force_shadow_load(int8_t imxdpuv1_id, } for (i = 0; i < IMXDPUV1_SHDLD_IDX_MAX; i++) { - temp_mask = 1 << i; + temp_mask = 1ULL << i; if ((mask & temp_mask) == 0) continue; |