treewide: kmalloc() -> kmalloc_array()
[sfrench/cifs-2.6.git] / drivers / tty / vt / consolemap.c
index 722a6690c70dc74fb3f13892d5c9eead4ed978c0..7c7ada0b3ea00d3b43cf4c12dcccc60257535186 100644 (file)
@@ -231,7 +231,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp,
        q = p->inverse_trans_unicode;
        if (!q) {
                q = p->inverse_trans_unicode =
-                       kmalloc(MAX_GLYPH * sizeof(u16), GFP_KERNEL);
+                       kmalloc_array(MAX_GLYPH, sizeof(u16), GFP_KERNEL);
                if (!q)
                        return;
        }
@@ -479,7 +479,8 @@ con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos)
 
        p1 = p->uni_pgdir[n = unicode >> 11];
        if (!p1) {
-               p1 = p->uni_pgdir[n] = kmalloc(32*sizeof(u16 *), GFP_KERNEL);
+               p1 = p->uni_pgdir[n] = kmalloc_array(32, sizeof(u16 *),
+                                                    GFP_KERNEL);
                if (!p1) return -ENOMEM;
                for (i = 0; i < 32; i++)
                        p1[i] = NULL;
@@ -487,7 +488,7 @@ con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos)
 
        p2 = p1[n = (unicode >> 6) & 0x1f];
        if (!p2) {
-               p2 = p1[n] = kmalloc(64*sizeof(u16), GFP_KERNEL);
+               p2 = p1[n] = kmalloc_array(64, sizeof(u16), GFP_KERNEL);
                if (!p2) return -ENOMEM;
                memset(p2, 0xff, 64*sizeof(u16)); /* No glyphs for the characters (yet) */
        }