summaryrefslogtreecommitdiff
path: root/drivers/staging/exfat
diff options
context:
space:
mode:
authorRoi Martin <jroi.martin@gmail.com>2019-10-31 13:31:39 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-01 10:50:37 +0100
commit129376c6d68617bc00e46bbfc4c21745db17b73d (patch)
tree4105b9f369d1bd3cecbf7a6392252cb19c9c3080 /drivers/staging/exfat
parent3ae82f449cea00de5cd894feb8e9154b2da99b4e (diff)
staging: exfat: replace kmalloc with kmalloc_array
Replace expressions of the form: kmalloc(count * size, GFP_KERNEL); With: kmalloc_array(count, size, GFP_KERNEL); Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191031123139.32361-1-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/exfat')
-rw-r--r--drivers/staging/exfat/exfat_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c
index f71235c6a338..f4f82aecc05d 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -713,8 +713,8 @@ static s32 __load_upcase_table(struct super_block *sb, sector_t sector,
u32 checksum = 0;
- upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
- GFP_KERNEL);
+ upcase_table = kmalloc_array(UTBL_COL_COUNT, sizeof(u16 *), GFP_KERNEL);
+ p_fs->vol_utbl = upcase_table;
if (!upcase_table)
return -ENOMEM;
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));
@@ -793,8 +793,8 @@ static s32 __load_default_upcase_table(struct super_block *sb)
u16 uni = 0;
u16 **upcase_table;
- upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
- GFP_KERNEL);
+ upcase_table = kmalloc_array(UTBL_COL_COUNT, sizeof(u16 *), GFP_KERNEL);
+ p_fs->vol_utbl = upcase_table;
if (!upcase_table)
return -ENOMEM;
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));