Commit 3dfea293 authored by Advait Dhamorikar's avatar Advait Dhamorikar Committed by Steve French

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: 94ae8c3f ("smb: client: compress: LZ77 code improvements cleanup")
Signed-off-by: default avatarAdvait Dhamorikar <advaitdhamorikar@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 1ab60323
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment