treewide: kmalloc() -> kmalloc_array()
[linux-2.6-microblaze.git] / drivers / infiniband / hw / qib / qib_iba6120.c
index 8a15e5c..fb1ff59 100644 (file)
@@ -2496,15 +2496,16 @@ static void init_6120_cntrnames(struct qib_devdata *dd)
                dd->cspec->cntrnamelen = sizeof(cntr6120names) - 1;
        else
                dd->cspec->cntrnamelen = 1 + s - cntr6120names;
-       dd->cspec->cntrs = kmalloc(dd->cspec->ncntrs
-               * sizeof(u64), GFP_KERNEL);
+       dd->cspec->cntrs = kmalloc_array(dd->cspec->ncntrs, sizeof(u64),
+                                        GFP_KERNEL);
 
        for (i = 0, s = (char *)portcntr6120names; s; i++)
                s = strchr(s + 1, '\n');
        dd->cspec->nportcntrs = i - 1;
        dd->cspec->portcntrnamelen = sizeof(portcntr6120names) - 1;
-       dd->cspec->portcntrs = kmalloc(dd->cspec->nportcntrs
-               * sizeof(u64), GFP_KERNEL);
+       dd->cspec->portcntrs = kmalloc_array(dd->cspec->nportcntrs,
+                                            sizeof(u64),
+                                            GFP_KERNEL);
 }
 
 static u32 qib_read_6120cntrs(struct qib_devdata *dd, loff_t pos, char **namep,