Skip to content

Commit 3dfea29

Browse files
advait-0smfrench
authored andcommitted
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: 94ae8c3 ("smb: client: compress: LZ77 code improvements cleanup") Signed-off-by: Advait Dhamorikar <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 1ab6032 commit 3dfea29

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/smb/client/compress.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample)
166166
loff_t start = iter->xarray_start + iter->iov_offset;
167167
pgoff_t last, index = start / PAGE_SIZE;
168168
size_t len, off, foff;
169-
ssize_t ret = 0;
170169
void *p;
171170
int s = 0;
172171

@@ -193,9 +192,6 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample)
193192
memcpy(&sample[s], p, len2);
194193
kunmap_local(p);
195194

196-
if (ret < 0)
197-
return ret;
198-
199195
s += len2;
200196

201197
if (len2 < SZ_2K || s >= max - SZ_2K)

0 commit comments

Comments
 (0)