Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thorsten Blum and committed by
Greg Kroah-Hartman
656a48c4 6b260538

+1 -1
+1 -1
drivers/char/adi.c
··· 131 131 ssize_t ret; 132 132 int i; 133 133 134 - if (count <= 0) 134 + if (count == 0) 135 135 return -EINVAL; 136 136 137 137 ver_buf_sz = min_t(size_t, count, MAX_BUF_SZ);