From: Thorsten Blum Date: Wed, 3 Sep 2025 20:23:51 +0000 (+0200) Subject: char/adi: Remove redundant less-than-zero check in adi_write() X-Git-Tag: v6.18-rc1~74^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=656a48c49a4a8a3685538dfaa2f37831b8213461;p=thirdparty%2Fkernel%2Flinux.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 Link: https://lore.kernel.org/r/20250903202350.182446-2-thorsten.blum@linux.dev Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/adi.c b/drivers/char/adi.c index f9bec10a60642..4312b0cc391cd 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);