diff options
Diffstat (limited to 'fs/ntfs/unistr.c')
| -rw-r--r-- | fs/ntfs/unistr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ntfs/unistr.c b/fs/ntfs/unistr.c index b123c0fa6bf6..a1b572196fe4 100644 --- a/fs/ntfs/unistr.c +++ b/fs/ntfs/unistr.c | |||
| @@ -350,7 +350,7 @@ int ntfs_ucstonls(const ntfs_volume *vol, const ntfschar *ins, | |||
| 350 | } | 350 | } |
| 351 | if (!ns) { | 351 | if (!ns) { |
| 352 | ns_len = ins_len * NLS_MAX_CHARSET_SIZE; | 352 | ns_len = ins_len * NLS_MAX_CHARSET_SIZE; |
| 353 | ns = (unsigned char*)kmalloc(ns_len + 1, GFP_NOFS); | 353 | ns = kmalloc(ns_len + 1, GFP_NOFS); |
| 354 | if (!ns) | 354 | if (!ns) |
| 355 | goto mem_err_out; | 355 | goto mem_err_out; |
| 356 | } | 356 | } |
| @@ -365,7 +365,7 @@ retry: wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o, | |||
| 365 | else if (wc == -ENAMETOOLONG && ns != *outs) { | 365 | else if (wc == -ENAMETOOLONG && ns != *outs) { |
| 366 | unsigned char *tc; | 366 | unsigned char *tc; |
| 367 | /* Grow in multiples of 64 bytes. */ | 367 | /* Grow in multiples of 64 bytes. */ |
| 368 | tc = (unsigned char*)kmalloc((ns_len + 64) & | 368 | tc = kmalloc((ns_len + 64) & |
| 369 | ~63, GFP_NOFS); | 369 | ~63, GFP_NOFS); |
| 370 | if (tc) { | 370 | if (tc) { |
| 371 | memcpy(tc, ns, ns_len); | 371 | memcpy(tc, ns, ns_len); |
