summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-05-13 18:27:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-03 09:17:55 +0300
commitf7e62552ad4ae0ce2822ad6dad191d4bbf02d115 (patch)
tree97a19dddbe5cc0cb459b9df37535ba00e3f9bb21
parent6ac5dc57b872b3425baa2e9e708ba948914fe744 (diff)
downloadlinux-f7e62552ad4ae0ce2822ad6dad191d4bbf02d115.tar.xz
cifs: Fix null pointer check in cifs_read
[ Upstream commit 9bd21d4b1a767c3abebec203342f3820dcb84662 ] Coverity scan noted a redundant null check Coverity-id: 728517 Reported-by: Coverity <scan-admin@coverity.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Shyam Prasad N <nspmangalore@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/cifs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 662977b8d6ae..72e7cbfb325a 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3496,7 +3496,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset)
* than it negotiated since it will refuse the read
* then.
*/
- if ((tcon->ses) && !(tcon->ses->capabilities &
+ if (!(tcon->ses->capabilities &
tcon->ses->server->vals->cap_large_files)) {
current_read_size = min_t(uint,
current_read_size, CIFSMaxBufSize);