]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/ssd130x: Use kmalloc_array() instead of kmalloc()
authorJames Flowers <bold.zone2373@fastmail.com>
Sun, 14 Sep 2025 07:38:22 +0000 (00:38 -0700)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 17 Sep 2025 10:16:19 +0000 (12:16 +0200)
commit940dd88c5f5bdb1f3e19873a856a677ebada63a9
treeb15b6477964234a84a4c24b784bd25c44216c45d
parent4db6e24f565b60a05c762554c05d37f780fe4406
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>
drivers/gpu/drm/solomon/ssd130x.c