diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-06-19 08:25:30 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-08-07 15:15:41 -0400 |
commit | ff361fda55fda55031252aca1f8afef735fe057c (patch) | |
tree | 20d7b706d4b85ff6b5ee45c90b82c107e1f2d52e /fs/cifs/smb2ops.c | |
parent | 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc (diff) |
cifs: Silence uninitialized variable warning
This is not really a runtime issue but Smatch complains that:
fs/cifs/smb2ops.c:1740 smb2_query_symlink()
error: uninitialized symbol 'resp_buftype'.
The warning is right that it can be uninitialized... Also "err_buf"
would be NULL at this point and we're not supposed to pass NULLs to
free_rsp_buf() or it might trigger some extra output if we turn on
debugging.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index ea92a38b2f08..ae64cbef5e07 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -1700,7 +1700,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon, | |||
1700 | &resp_buftype); | 1700 | &resp_buftype); |
1701 | if (!rc || !err_iov.iov_base) { | 1701 | if (!rc || !err_iov.iov_base) { |
1702 | rc = -ENOENT; | 1702 | rc = -ENOENT; |
1703 | goto querty_exit; | 1703 | goto free_path; |
1704 | } | 1704 | } |
1705 | 1705 | ||
1706 | err_buf = err_iov.iov_base; | 1706 | err_buf = err_iov.iov_base; |
@@ -1741,6 +1741,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon, | |||
1741 | 1741 | ||
1742 | querty_exit: | 1742 | querty_exit: |
1743 | free_rsp_buf(resp_buftype, err_buf); | 1743 | free_rsp_buf(resp_buftype, err_buf); |
1744 | free_path: | ||
1744 | kfree(utf16_path); | 1745 | kfree(utf16_path); |
1745 | return rc; | 1746 | return rc; |
1746 | } | 1747 | } |