treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / char / agp / uninorth-agp.c
index 79d8c84693a185264990d40185006f5eaec0f145..31fcd04304263a21161d2e7aae378a2daa789995 100644 (file)
@@ -402,7 +402,9 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
        if (table == NULL)
                return -ENOMEM;
 
-       uninorth_priv.pages_arr = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL);
+       uninorth_priv.pages_arr = kmalloc_array(1 << page_order,
+                                               sizeof(struct page *),
+                                               GFP_KERNEL);
        if (uninorth_priv.pages_arr == NULL)
                goto enomem;