mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
37a530bfe5
commit
548744f844
1 changed files with 1 additions and 3 deletions
|
@ -1333,9 +1333,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits)
|
|||
if (!new_free)
|
||||
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,
|
||||
(new_wnd - wnd->nwnd) * sizeof(short));
|
||||
kfree(wnd->free_bits);
|
||||
|
|
Loading…
Add table
Reference in a new issue