mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
ntfs: remove unnecessary NULL checks before kfree
NULL check before kfree() is unnecessary and triggers coccinelle warnings. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
949ba99cfe
commit
3964169d68
|
|
@ -622,8 +622,7 @@ bool ntfs_check_logfile(struct inode *log_vi, struct restart_page_header **rp)
|
|||
ntfs_debug("Done.");
|
||||
return true;
|
||||
err_out:
|
||||
if (rstr1_ph)
|
||||
kvfree(rstr1_ph);
|
||||
kvfree(rstr1_ph);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1634,7 +1634,7 @@ static void ntfs_volume_free(struct ntfs_volume *vol)
|
|||
vol->upcase = NULL;
|
||||
}
|
||||
|
||||
if (!ntfs_nr_upcase_users && default_upcase) {
|
||||
if (!ntfs_nr_upcase_users) {
|
||||
kvfree(default_upcase);
|
||||
default_upcase = NULL;
|
||||
}
|
||||
|
|
@ -1649,8 +1649,7 @@ static void ntfs_volume_free(struct ntfs_volume *vol)
|
|||
|
||||
unload_nls(vol->nls_map);
|
||||
|
||||
if (vol->lcn_empty_bits_per_page)
|
||||
kvfree(vol->lcn_empty_bits_per_page);
|
||||
kvfree(vol->lcn_empty_bits_per_page);
|
||||
kfree(vol->volume_label);
|
||||
kfree(vol);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user