Re: [PATCH] drm/tegra : Avoid potential integer overflow of 32 bit int

From: Thierry Reding
Date: Thu Apr 06 2023 - 08:05:25 EST


From: Thierry Reding <treding@xxxxxxxxxx>

On Thu, 6 Apr 2023 04:25:59 +0800, Nur Hussein wrote:
> In tegra_sor_compute_config(), the 32-bit value mode->clock
> is multiplied by 1000, and assigned to the u64 variable pclk.
> We can avoid a potential 32-bit integer overflow by casting
> mode->clock to u64 before we do the arithmetic and assignment.
>
>

Applied, thanks!

[1/1] drm/tegra : Avoid potential integer overflow of 32 bit int
(no commit info)

Best regards,
--
Thierry Reding <treding@xxxxxxxxxx>