Skip to content

Commit

Permalink
[CIFS] Remove redundant NULL check
Browse files Browse the repository at this point in the history
Noticed by Coverity checker.

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed May 22, 2008
1 parent 78b58e5 commit 0d817bc
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,8 +2159,7 @@ CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName,
cFYI(1, ("Send error in copy = %d with %d files copied",
rc, le16_to_cpu(pSMBr->CopyCount)));
}
if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);

if (rc == -EAGAIN)
goto copyRetry;
Expand Down Expand Up @@ -2249,8 +2248,7 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon,
if (rc)
cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc));

if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);

if (rc == -EAGAIN)
goto createSymLinkRetry;
Expand Down Expand Up @@ -4095,8 +4093,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
target_nodes, nls_codepage);

GetDFSRefExit:
if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);

if (rc == -EAGAIN)
goto getDFSRetry;
Expand Down Expand Up @@ -5117,8 +5114,7 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
if (rc)
cFYI(1, ("SetPathInfo (perms) returned %d", rc));

if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
goto setPermsRetry;
return rc;
Expand Down Expand Up @@ -5340,8 +5336,7 @@ CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
}
}
}
if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
goto QAllEAsRetry;

Expand Down Expand Up @@ -5490,8 +5485,7 @@ ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon,
}
}
}
if (pSMB)
cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
goto QEARetry;

Expand Down

0 comments on commit 0d817bc

Please sign in to comment.