]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - fs/cifs/transport.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / fs / cifs / transport.c
index 24887a0898c05dbc92f59d4034d7a2c1a9a0d382..1f1a68f8911001bae86976171e44a09402982d92 100644 (file)
@@ -844,8 +844,8 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses,
        int rc;
 
        if (n_vec + 1 > CIFS_MAX_IOV_SIZE) {
-               new_iov = kmalloc(sizeof(struct kvec) * (n_vec + 1),
-                                 GFP_KERNEL);
+               new_iov = kmalloc_array(n_vec + 1, sizeof(struct kvec),
+                                       GFP_KERNEL);
                if (!new_iov) {
                        /* otherwise cifs_send_recv below sets resp_buf_type */
                        *resp_buf_type = CIFS_NO_BUFFER;
@@ -886,8 +886,8 @@ smb2_send_recv(const unsigned int xid, struct cifs_ses *ses,
        __be32 rfc1002_marker;
 
        if (n_vec + 1 > CIFS_MAX_IOV_SIZE) {
-               new_iov = kmalloc(sizeof(struct kvec) * (n_vec + 1),
-                                 GFP_KERNEL);
+               new_iov = kmalloc_array(n_vec + 1, sizeof(struct kvec),
+                                       GFP_KERNEL);
                if (!new_iov)
                        return -ENOMEM;
        } else