treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / video / fbdev / core / fbcon_ccw.c
index 37a8b0b225663780e6e28dd4ba239a6be9581071..dfa9a8aa4509c1705ec2beeda76ff3cf03e60e65 100644 (file)
@@ -258,7 +258,7 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode,
        if (attribute) {
                u8 *dst;
 
-               dst = kmalloc(w * vc->vc_font.width, GFP_ATOMIC);
+               dst = kmalloc_array(w, vc->vc_font.width, GFP_ATOMIC);
                if (!dst)
                        return;
                kfree(ops->cursor_data);
@@ -304,14 +304,15 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode,
            vc->vc_cursor_type != ops->p->cursor_shape ||
            ops->cursor_state.mask == NULL ||
            ops->cursor_reset) {
-               char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC);
+               char *tmp, *mask = kmalloc_array(w, vc->vc_font.width,
+                                                GFP_ATOMIC);
                int cur_height, size, i = 0;
                int width = (vc->vc_font.width + 7)/8;
 
                if (!mask)
                        return;
 
-               tmp = kmalloc(width * vc->vc_font.height, GFP_ATOMIC);
+               tmp = kmalloc_array(width, vc->vc_font.height, GFP_ATOMIC);
 
                if (!tmp) {
                        kfree(mask);