Skip to content

Commit

Permalink
cifs: Fix null pointer check in cifs_read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French committed May 14, 2020
1 parent 3dc58df commit 9bd21d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9bd21d4

Please sign in to comment.