]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - drivers/infiniband/ulp/srpt/ib_srpt.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / drivers / infiniband / ulp / srpt / ib_srpt.c
index dfec0e1fac29e9f4e85d17dd4cd66347ec5013a3..3081c629a7f79730e319504fd72fa4e92f66debf 100644 (file)
@@ -720,7 +720,7 @@ static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev,
        WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx)
                && ioctx_size != sizeof(struct srpt_send_ioctx));
 
-       ring = kmalloc(ring_size * sizeof(ring[0]), GFP_KERNEL);
+       ring = kmalloc_array(ring_size, sizeof(ring[0]), GFP_KERNEL);
        if (!ring)
                goto out;
        for (i = 0; i < ring_size; ++i) {