Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 325dbbbe authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

drm/arm: fix unintentional integer overflow on left shift



[ Upstream commit 5f368ddea6fec519bdb93b5368f6a844b6ea27a6 ]

Shifting the integer value 1 is evaluated using 32-bit arithmetic
and then used in an expression that expects a long value leads to
a potential integer overflow. Fix this by using the BIT macro to
perform the shift to avoid the overflow.

Addresses-Coverity: ("Unintentional integer overflow")
Fixes: ad49f860 ("drm/arm: Add support for Mali Display Processors")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Signed-off-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200618100400.11464-1-colin.king@canonical.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ce2f02ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment