drm/ssd130x: Use kmalloc_array() instead of kmalloc()

Documentation/process/deprecated.rst recommends against the use of
kmalloc with dynamic size calculations due to the risk of overflow and
smaller allocation being made than the caller was expecting.
kmalloc_array avoids this issue.

Signed-off-by: James Flowers <bold.zone2373@fastmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250914073841.69582-1-bold.zone2373@fastmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
James Flowers 2025-09-14 00:38:22 -07:00 • committed by Javier Martinez Canillas
commit 940dd88c5f
No known key found for this signature in database
GPG key ID: C751E590D63F3D69