]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - drivers/tty/hvc/hvcs.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / drivers / tty / hvc / hvcs.c
index 1db1d97e72e7ee13c8bb1d013dcf5e5ceaf261b4..cb4db1b3ca3c0daab51bbc466789dc5d5bc0710f 100644 (file)
@@ -1441,7 +1441,8 @@ static int hvcs_alloc_index_list(int n)
 {
        int i;
 
-       hvcs_index_list = kmalloc(n * sizeof(hvcs_index_count),GFP_KERNEL);
+       hvcs_index_list = kmalloc_array(n, sizeof(hvcs_index_count),
+                                       GFP_KERNEL);
        if (!hvcs_index_list)
                return -ENOMEM;
        hvcs_index_count = n;