mirror of https://github.com/torvalds/linux.git
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 <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250903202350.182446-2-thorsten.blum@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6b26053819
commit
656a48c49a
|
|
@ -131,7 +131,7 @@ static ssize_t adi_write(struct file *file, const char __user *buf,
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (count <= 0)
|
if (count == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ver_buf_sz = min_t(size_t, count, MAX_BUF_SZ);
|
ver_buf_sz = min_t(size_t, count, MAX_BUF_SZ);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue