treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / fs / ufs / super.c
index 8254b8b3690fa7d553c4ec6187a99f9c420f023f..488088141451ba6c9dab80dd0c96a1502100b3f7 100644 (file)
@@ -541,7 +541,9 @@ static int ufs_read_cylinder_structures(struct super_block *sb)
         * Read cylinder group (we read only first fragment from block
         * at this time) and prepare internal data structures for cg caching.
         */
-       if (!(sbi->s_ucg = kmalloc (sizeof(struct buffer_head *) * uspi->s_ncg, GFP_NOFS)))
+       sbi->s_ucg = kmalloc_array(uspi->s_ncg, sizeof(struct buffer_head *),
+                                  GFP_NOFS);
+       if (!sbi->s_ucg)
                goto failed;
        for (i = 0; i < uspi->s_ncg; i++) 
                sbi->s_ucg[i] = NULL;