diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-09-03 22:23:51 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-06 16:00:36 +0200 |
| commit | 656a48c49a4a8a3685538dfaa2f37831b8213461 (patch) | |
| tree | d3795131d9845e85090a1b92cf9b687f73f04fd0 | |
| parent | 6b26053819dccc664120e07c56f107fb6f72f3fa (diff) | |
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>
| -rw-r--r-- | drivers/char/adi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/adi.c b/drivers/char/adi.c index f9bec10a6064..4312b0cc391c 100644 --- a/drivers/char/adi.c +++ b/drivers/char/adi.c @@ -131,7 +131,7 @@ static ssize_t adi_write(struct file *file, const char __user *buf, ssize_t ret; int i; - if (count <= 0) + if (count == 0) return -EINVAL; ver_buf_sz = min_t(size_t, count, MAX_BUF_SZ); |
