treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / lib / reed_solomon / reed_solomon.c
index dfcf54242fb92f50d544169b7c723b81e78f1984..d8bb1a1eba722f89fc307209ed97ba65f0579052 100644 (file)
@@ -88,15 +88,15 @@ static struct rs_codec *codec_init(int symsize, int gfpoly, int (*gffunc)(int),
        rs->gffunc = gffunc;
 
        /* Allocate the arrays */
-       rs->alpha_to = kmalloc(sizeof(uint16_t) * (rs->nn + 1), gfp);
+       rs->alpha_to = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp);
        if (rs->alpha_to == NULL)
                goto err;
 
-       rs->index_of = kmalloc(sizeof(uint16_t) * (rs->nn + 1), gfp);
+       rs->index_of = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp);
        if (rs->index_of == NULL)
                goto err;
 
-       rs->genpoly = kmalloc(sizeof(uint16_t) * (rs->nroots + 1), gfp);
+       rs->genpoly = kmalloc_array(rs->nroots + 1, sizeof(uint16_t), gfp);
        if(rs->genpoly == NULL)
                goto err;