[CIFS] Remove redundant test
authorJulia Lawall <julia@diku.dk>
Mon, 22 Dec 2008 21:53:40 +0000 (21:53 +0000)
committerSteve French <sfrench@us.ibm.com>
Fri, 26 Dec 2008 02:29:13 +0000 (02:29 +0000)
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>
fs/cifs/cifssmb.c

index 824df142f288125f7ddfbe710c17da42c98094f9..552642a507c4be6744e32a0738c07d27bd89a635 100644 (file)
@@ -1871,10 +1871,6 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
                        rc = -EIO;      /* bad smb */
                        goto plk_err_exit;
                }
-               if (pLockData == NULL) {
-                       rc = -EINVAL;
-                       goto plk_err_exit;
-               }
                data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
                data_count  = le16_to_cpu(pSMBr->t2.DataCount);
                if (data_count < sizeof(struct cifs_posix_lock)) {