Commit 917520e1 authored by SF Markus Elfring's avatar SF Markus Elfring Committed by Linus Torvalds

ntfs: delete unnecessary checks before calling iput()

iput() tests whether its argument is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: default avatarAnton Altaparmakov <anton@tuxera.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 35108d71
...@@ -2204,17 +2204,12 @@ static bool load_system_files(ntfs_volume *vol) ...@@ -2204,17 +2204,12 @@ static bool load_system_files(ntfs_volume *vol)
return true; return true;
#ifdef NTFS_RW #ifdef NTFS_RW
iput_usnjrnl_err_out: iput_usnjrnl_err_out:
if (vol->usnjrnl_j_ino) iput(vol->usnjrnl_j_ino);
iput(vol->usnjrnl_j_ino); iput(vol->usnjrnl_max_ino);
if (vol->usnjrnl_max_ino) iput(vol->usnjrnl_ino);
iput(vol->usnjrnl_max_ino);
if (vol->usnjrnl_ino)
iput(vol->usnjrnl_ino);
iput_quota_err_out: iput_quota_err_out:
if (vol->quota_q_ino) iput(vol->quota_q_ino);
iput(vol->quota_q_ino); iput(vol->quota_ino);
if (vol->quota_ino)
iput(vol->quota_ino);
iput(vol->extend_ino); iput(vol->extend_ino);
#endif /* NTFS_RW */ #endif /* NTFS_RW */
iput_sec_err_out: iput_sec_err_out:
...@@ -2223,8 +2218,7 @@ static bool load_system_files(ntfs_volume *vol) ...@@ -2223,8 +2218,7 @@ static bool load_system_files(ntfs_volume *vol)
iput(vol->root_ino); iput(vol->root_ino);
iput_logfile_err_out: iput_logfile_err_out:
#ifdef NTFS_RW #ifdef NTFS_RW
if (vol->logfile_ino) iput(vol->logfile_ino);
iput(vol->logfile_ino);
iput_vol_err_out: iput_vol_err_out:
#endif /* NTFS_RW */ #endif /* NTFS_RW */
iput(vol->vol_ino); iput(vol->vol_ino);
...@@ -2254,8 +2248,7 @@ static bool load_system_files(ntfs_volume *vol) ...@@ -2254,8 +2248,7 @@ static bool load_system_files(ntfs_volume *vol)
iput(vol->mftbmp_ino); iput(vol->mftbmp_ino);
iput_mirr_err_out: iput_mirr_err_out:
#ifdef NTFS_RW #ifdef NTFS_RW
if (vol->mftmirr_ino) iput(vol->mftmirr_ino);
iput(vol->mftmirr_ino);
#endif /* NTFS_RW */ #endif /* NTFS_RW */
return false; return false;
} }
......
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