]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix static checker warning
authorPaulo Alcantara <pc@cjr.nz>
Fri, 14 Oct 2022 16:40:42 +0000 (13:40 -0300)
committerSteve French <stfrench@microsoft.com>
Fri, 14 Oct 2022 17:35:25 +0000 (12:35 -0500)
commit11d52e66a2b3736e0e7206f7f840c7b40e84994b
tree37b659e76349993eef0ad98860ef9e81a3f60383
parent8a65de5e7507e8f3bf980a01cac8af9a69a606c2
cifs: fix static checker warning

Remove unnecessary NULL check of oparam->cifs_sb when parsing symlink
error response as it's already set by all smb2_open_file() callers and
deferenced earlier.

This fixes below report:

  fs/cifs/smb2file.c:126 smb2_open_file()
  warn: variable dereferenced before check 'oparms->cifs_sb' (see line 112)

Link: https://lore.kernel.org/r/Y0kt42j2tdpYakRu@kili
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2file.c