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:
Thorsten Blum 2025-09-03 22:23:51 +02:00 committed by Greg Kroah-Hartman
parent 6b26053819
commit 656a48c49a
1 changed files with 1 additions and 1 deletions

View File

@ -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);