char/adi: Remove redundant less-than-zero check in adi_write()
PATCH 1/1 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 <[email protected]>
--- drivers/char/adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/adi.c +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 );
Signature · 1 line
2.51.0