VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Kees Cook <keescook@chromium.org> 2018-06-12 13:55:00 -0700 committer: Kees Cook <keescook@chromium.org> 2018-06-12 16:19:22 -0700 commit: 6da2ec56059c3c7a7e5f729e6349e74ace1e5c57 parent: 1c542f38ab8d30d9c852a16d49ac5a15267bbf1f
Commit Summary:
treewide: kmalloc() -> kmalloc_array()
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index cfda2c7caedc..71fa525d63a0 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -313,7 +313,7 @@ static struct adfs_discmap *adfs_read_map(struct super_block *sb, struct adfs_di
 
 	asb->s_ids_per_zone = zone_size / (asb->s_idlen + 1);
 
-	dm = kmalloc(nzones * sizeof(*dm), GFP_KERNEL);
+	dm = kmalloc_array(nzones, sizeof(*dm), GFP_KERNEL);
 	if (dm == NULL) {
 		adfs_error(sb, "not enough memory");
 		return ERR_PTR(-ENOMEM);