diff options
author | Advait Dhamorikar <advaitdhamorikar@gmail.com> | 2024-10-07 20:53:34 +0530 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-10-16 00:30:52 -0500 |
commit | 3dfea293f4279b3021cb0ecf3807e763bddb63b9 (patch) | |
tree | cab6c58edb3982a480c59b286e088c415d776d0d /fs | |
parent | 1ab60323c5201bef25f2a3dc0ccc404d9aca77f1 (diff) |
smb/client: Fix logically dead code
The if condition in collect_sample: can never be satisfied
because of a logical contradiction. The indicated dead code
may have performed some action; that action will never occur.
Fixes: 94ae8c3fee94 ("smb: client: compress: LZ77 code improvements cleanup")
Signed-off-by: Advait Dhamorikar <advaitdhamorikar@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/smb/client/compress.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c index 63b5a55b7a57..766b4de13da7 100644 --- a/fs/smb/client/compress.c +++ b/fs/smb/client/compress.c @@ -166,7 +166,6 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample) loff_t start = iter->xarray_start + iter->iov_offset; pgoff_t last, index = start / PAGE_SIZE; size_t len, off, foff; - ssize_t ret = 0; void *p; int s = 0; @@ -193,9 +192,6 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample) memcpy(&sample[s], p, len2); kunmap_local(p); - if (ret < 0) - return ret; - s += len2; if (len2 < SZ_2K || s >= max - SZ_2K) |