]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - net/9p/trans_virtio.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / net / 9p / trans_virtio.c
index 4d0372263e5d3057f0b300fbacb6f50a3c58e6ad..05006cbb33616e4a30de07180c1d400c91d05a10 100644 (file)
@@ -360,7 +360,8 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
                nr_pages = DIV_ROUND_UP((unsigned long)p + len, PAGE_SIZE) -
                           (unsigned long)p / PAGE_SIZE;
 
-               *pages = kmalloc(sizeof(struct page *) * nr_pages, GFP_NOFS);
+               *pages = kmalloc_array(nr_pages, sizeof(struct page *),
+                                      GFP_NOFS);
                if (!*pages)
                        return -ENOMEM;