staging: exfat: Clean up return code - FFS_MEMORYERR
Convert FFS_MEMORYERR to -ENOMEM Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
03eac8d594
commit
630d00b8b2
|
@ -218,7 +218,6 @@ static inline u16 get_row_index(u16 i)
|
||||||
#define FFS_NOTOPENED 12
|
#define FFS_NOTOPENED 12
|
||||||
#define FFS_MAXOPENED 13
|
#define FFS_MAXOPENED 13
|
||||||
#define FFS_EOF 15
|
#define FFS_EOF 15
|
||||||
#define FFS_MEMORYERR 17
|
|
||||||
#define FFS_ERROR 19
|
#define FFS_ERROR 19
|
||||||
|
|
||||||
#define NUM_UPCASE 2918
|
#define NUM_UPCASE 2918
|
||||||
|
|
|
@ -544,7 +544,7 @@ s32 load_alloc_bitmap(struct super_block *sb)
|
||||||
sizeof(struct buffer_head *),
|
sizeof(struct buffer_head *),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!p_fs->vol_amap)
|
if (!p_fs->vol_amap)
|
||||||
return FFS_MEMORYERR;
|
return -ENOMEM;
|
||||||
|
|
||||||
sector = START_SECTOR(p_fs->map_clu);
|
sector = START_SECTOR(p_fs->map_clu);
|
||||||
|
|
||||||
|
@ -715,7 +715,7 @@ static s32 __load_upcase_table(struct super_block *sb, sector_t sector,
|
||||||
upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
|
upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!upcase_table)
|
if (!upcase_table)
|
||||||
return FFS_MEMORYERR;
|
return -ENOMEM;
|
||||||
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));
|
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));
|
||||||
|
|
||||||
while (sector < end_sector) {
|
while (sector < end_sector) {
|
||||||
|
@ -755,7 +755,7 @@ static s32 __load_upcase_table(struct super_block *sb, sector_t sector,
|
||||||
upcase_table[col_index] = kmalloc_array(UTBL_ROW_COUNT,
|
upcase_table[col_index] = kmalloc_array(UTBL_ROW_COUNT,
|
||||||
sizeof(u16), GFP_KERNEL);
|
sizeof(u16), GFP_KERNEL);
|
||||||
if (!upcase_table[col_index]) {
|
if (!upcase_table[col_index]) {
|
||||||
ret = FFS_MEMORYERR;
|
ret = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -795,7 +795,7 @@ static s32 __load_default_upcase_table(struct super_block *sb)
|
||||||
upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
|
upcase_table = p_fs->vol_utbl = kmalloc(UTBL_COL_COUNT * sizeof(u16 *),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!upcase_table)
|
if (!upcase_table)
|
||||||
return FFS_MEMORYERR;
|
return -ENOMEM;
|
||||||
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));
|
memset(upcase_table, 0, UTBL_COL_COUNT * sizeof(u16 *));
|
||||||
|
|
||||||
for (i = 0; index <= 0xFFFF && i < NUM_UPCASE * 2; i += 2) {
|
for (i = 0; index <= 0xFFFF && i < NUM_UPCASE * 2; i += 2) {
|
||||||
|
@ -818,7 +818,7 @@ static s32 __load_default_upcase_table(struct super_block *sb)
|
||||||
sizeof(u16),
|
sizeof(u16),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!upcase_table[col_index]) {
|
if (!upcase_table[col_index]) {
|
||||||
ret = FFS_MEMORYERR;
|
ret = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue