From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Steve French <stfrench@microsoft.com>,
Coverity <scan-admin@coverity.com>,
Shyam Prasad N <nspmangalore@gmail.com>,
Sasha Levin <sashal@kernel.org>,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org
Subject: [PATCH AUTOSEL 4.4 5/5] cifs: Fix null pointer check in cifs_read
Date: Fri, 22 May 2020 10:52:07 -0400 [thread overview]
Message-ID: <20200522145207.435314-5-sashal@kernel.org> (raw)
In-Reply-To: <20200522145207.435314-1-sashal@kernel.org>
From: Steve French <stfrench@microsoft.com>
[ 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>
---
fs/cifs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 2ffdaedca7e9..b5a05092f862 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3230,7 +3230,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);
--
2.25.1
prev parent reply other threads:[~2020-05-22 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 14:52 [PATCH AUTOSEL 4.4 1/5] gfs2: don't call quota_unhold if quotas are not locked Sasha Levin
2020-05-22 14:52 ` [PATCH AUTOSEL 4.4 2/5] Revert "gfs2: Don't demote a glock until its revokes are written" Sasha Levin
2020-05-22 14:52 ` [PATCH AUTOSEL 4.4 3/5] cachefiles: Fix race between read_waiter and read_copier involving op->to_do Sasha Levin
2020-05-22 14:52 ` [PATCH AUTOSEL 4.4 4/5] usb: gadget: legacy: fix redundant initialization warnings Sasha Levin
2020-05-22 14:52 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200522145207.435314-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=scan-admin@coverity.com \
--cc=stable@vger.kernel.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).