diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-13 17:15:54 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-13 17:15:54 +0200 |
commit | 4a6d87f1db06c9670251d6c72a89319e7d1cbaee (patch) | |
tree | aa21e8220215933742f931a452d7d96839b93c2b /fs/cifs/dir.c | |
parent | Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff) | |
download | linux-4a6d87f1db06c9670251d6c72a89319e7d1cbaee.tar.xz linux-4a6d87f1db06c9670251d6c72a89319e7d1cbaee.zip |
[CIFS] Add missing check for path name allocation failure. Remove four
redundant null pointer checks before cifs_buf_release.
Found by coverity analyzer.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index c0f20fc09290..c619d45060ce 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -226,7 +226,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, } if (rc != 0) { - cFYI(1,("Create worked but get_inode_info failed with rc = %d", + cFYI(1, + ("Create worked but get_inode_info failed rc = %d", rc)); } else { direntry->d_op = &cifs_dentry_ops; @@ -303,8 +304,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, dev_t dev up(&direntry->d_sb->s_vfs_rename_sem); if(full_path == NULL) rc = -ENOMEM; - - if (full_path && (pTcon->ses->capabilities & CAP_UNIX)) { + else if (pTcon->ses->capabilities & CAP_UNIX) { if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,(__u64)current->euid,(__u64)current->egid, |