treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / net / bluetooth / hci_core.c
index 1dec337901988ad96b6eeaf6b7a46f3da85f59c7..ee8ef12282639d09ac975c7ef0e09b644a719009 100644 (file)
@@ -1281,7 +1281,7 @@ int hci_inquiry(void __user *arg)
        /* cache_dump can't sleep. Therefore we allocate temp buffer and then
         * copy it to the user space.
         */
-       buf = kmalloc(sizeof(struct inquiry_info) * max_rsp, GFP_KERNEL);
+       buf = kmalloc_array(max_rsp, sizeof(struct inquiry_info), GFP_KERNEL);
        if (!buf) {
                err = -ENOMEM;
                goto done;