]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/s390/char/tty3270.c
treewide: kmalloc() -> kmalloc_array()
[linux.git] / drivers / s390 / char / tty3270.c
index e417ccd9e299891560b2b2c1e67565f0eb46df47..5b8af278228282914a4250ee655aa4f85355ef7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    IBM/3270 Driver - tty functions.
  *
@@ -718,7 +719,8 @@ tty3270_alloc_view(void)
        if (!tp)
                goto out_err;
        tp->freemem_pages =
-               kmalloc(sizeof(void *) * TTY3270_STRING_PAGES, GFP_KERNEL);
+               kmalloc_array(TTY3270_STRING_PAGES, sizeof(void *),
+                             GFP_KERNEL);
        if (!tp->freemem_pages)
                goto out_tp;
        INIT_LIST_HEAD(&tp->freemem);