* [PATCH AUTOSEL 5.4 29/32] cifs: Fix null pointer check in cifs_read
[not found] <20200522145044.434677-1-sashal@kernel.org>
@ 2020-05-22 14:50 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2020-05-22 14:50 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Steve French, Coverity, Shyam Prasad N, Sasha Levin, linux-cifs,
samba-technical
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 b095094c0842..4959dbe740f7 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3997,7 +3997,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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-22 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200522145044.434677-1-sashal@kernel.org>
2020-05-22 14:50 ` [PATCH AUTOSEL 5.4 29/32] cifs: Fix null pointer check in cifs_read Sasha Levin
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).