]> www.infradead.org Git - users/hch/misc.git/commit
drm/amd/display: change kzalloc to kcalloc in dcn30_validate_bandwidth()
authorEthan Carter Edwards <ethan@ethancedwards.com>
Thu, 27 Feb 2025 23:16:21 +0000 (18:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Mar 2025 17:36:04 +0000 (13:36 -0400)
commitf4f086de310026abfe28512dfa4984fb4648663a
tree1727a683a9be20148a9be75901322c739a072084
parent2f1b6b24b0ddc6e3342a6c5f731b79e57339f102
drm/amd/display: change kzalloc to kcalloc in dcn30_validate_bandwidth()

We are trying to get rid of all multiplications from allocation
functions to prevent integer overflows. Here the multiplication is
probably safe, but using kcalloc() is more appropriate and improves
readability. This patch has no effect on runtime behavior.

Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c