Commit 548744f8 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Konstantin Komarov

fs/ntfs3: Remove a useless test

'new_free' has just been allocated by kmalloc() and is known to be not
NULL.
So this pointer can't be equal to a previous memory allocation.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 37a530bf
...@@ -1333,9 +1333,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits) ...@@ -1333,9 +1333,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits)
if (!new_free) if (!new_free)
return -ENOMEM; return -ENOMEM;
if (new_free != wnd->free_bits) memcpy(new_free, wnd->free_bits, wnd->nwnd * sizeof(short));
memcpy(new_free, wnd->free_bits,
wnd->nwnd * sizeof(short));
memset(new_free + wnd->nwnd, 0, memset(new_free + wnd->nwnd, 0,
(new_wnd - wnd->nwnd) * sizeof(short)); (new_wnd - wnd->nwnd) * sizeof(short));
kfree(wnd->free_bits); kfree(wnd->free_bits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment