diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-01-22 15:07:16 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-01-23 22:32:01 -0500 |
commit | 3f391c79b0686ce183668c6e2b7d02f3e716766c (patch) | |
tree | 304cdb0d55dd84fccfffaf281ff9f06c265a138c /fs/cifs | |
parent | 1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff) |
CIFS: Remove pointless variable assignment in cifs_dfs_do_automount()
In fs/cifs/cifs_dfs_ref.c::cifs_dfs_do_automount() we have this code:
...
mnt = ERR_PTR(-EINVAL);
if (IS_ERR(tlink)) {
mnt = ERR_CAST(tlink);
goto free_full_path;
}
ses = tlink_tcon(tlink)->ses;
rc = get_dfs_path(xid, ses, full_path + 1, cifs_sb->local_nls,
&num_referrals, &referrals,
cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
cifs_put_tlink(tlink);
mnt = ERR_PTR(-ENOENT);
...
The assignment of 'mnt = ERR_PTR(-EINVAL);' is completely pointless. If we
take the 'if (IS_ERR(tlink))' branch we'll set 'mnt' again and we'll also
do so if we do not take the branch. There is no way we'll ever use 'mnt'
with the assigned 'ERR_PTR(-EINVAL)' value, so we may as well just remove
the pointless assignment.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 7ed36536e754..f1c68629f277 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -297,7 +297,6 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt) | |||
297 | 297 | ||
298 | cifs_sb = CIFS_SB(mntpt->d_inode->i_sb); | 298 | cifs_sb = CIFS_SB(mntpt->d_inode->i_sb); |
299 | tlink = cifs_sb_tlink(cifs_sb); | 299 | tlink = cifs_sb_tlink(cifs_sb); |
300 | mnt = ERR_PTR(-EINVAL); | ||
301 | if (IS_ERR(tlink)) { | 300 | if (IS_ERR(tlink)) { |
302 | mnt = ERR_CAST(tlink); | 301 | mnt = ERR_CAST(tlink); |
303 | goto free_full_path; | 302 | goto free_full_path; |