mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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:
1 parent
6b26053819
commit
656a48c49a
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user