Skip to content

Commit 656a48c

Browse files
tobluxgregkh
authored andcommitted
char/adi: Remove redundant less-than-zero check in adi_write()
The function parameter 'size_t count' is unsigned and cannot be less than zero. Remove the redundant condition. Signed-off-by: Thorsten Blum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6b26053 commit 656a48c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/adi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static ssize_t adi_write(struct file *file, const char __user *buf,
131131
ssize_t ret;
132132
int i;
133133

134-
if (count <= 0)
134+
if (count == 0)
135135
return -EINVAL;
136136

137137
ver_buf_sz = min_t(size_t, count, MAX_BUF_SZ);

0 commit comments

Comments
 (0)