diff options
author | Julia Lawall <julia@diku.dk> | 2008-12-22 16:53:40 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-12-25 21:29:13 -0500 |
commit | 359d67d6ad054ae11ad459665fdfb883aca87782 (patch) | |
tree | c4cb640ec1692b7f89144fd8bed7e0505a8cad43 /fs/cifs | |
parent | c6fbba0546d3ead18d4a623e76e28bcbaa66a325 (diff) |
[CIFS] Remove redundant test
In fs/cifs/cifssmb.c, pLockData is tested for being NULL at the beginning
of the function, and not reassigned subsequently.
A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifssmb.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 824df142f288..552642a507c4 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -1871,10 +1871,6 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1871 | rc = -EIO; /* bad smb */ | 1871 | rc = -EIO; /* bad smb */ |
1872 | goto plk_err_exit; | 1872 | goto plk_err_exit; |
1873 | } | 1873 | } |
1874 | if (pLockData == NULL) { | ||
1875 | rc = -EINVAL; | ||
1876 | goto plk_err_exit; | ||
1877 | } | ||
1878 | data_offset = le16_to_cpu(pSMBr->t2.DataOffset); | 1874 | data_offset = le16_to_cpu(pSMBr->t2.DataOffset); |
1879 | data_count = le16_to_cpu(pSMBr->t2.DataCount); | 1875 | data_count = le16_to_cpu(pSMBr->t2.DataCount); |
1880 | if (data_count < sizeof(struct cifs_posix_lock)) { | 1876 | if (data_count < sizeof(struct cifs_posix_lock)) { |