From: Steve French Date: Wed, 13 May 2020 15:27:16 +0000 (-0500) Subject: cifs: Fix null pointer check in cifs_read X-Git-Tag: v5.6.16~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52ce2142fc94a9a3264c9fda563e249541f47b38;p=thirdparty%2Fkernel%2Fstable.git cifs: Fix null pointer check in cifs_read [ Upstream commit 9bd21d4b1a767c3abebec203342f3820dcb84662 ] Coverity scan noted a redundant null check Coverity-id: 728517 Reported-by: Coverity Signed-off-by: Steve French Reviewed-by: Shyam Prasad N Signed-off-by: Sasha Levin --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5920820bfbd07..b30b03747dd65 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -4060,7 +4060,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);