From 389345cf6d71914b39130b1ea04dab1b7bacf6bd Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Thu, 17 Jul 2014 15:18:53 +0300 Subject: drivers/char/dsp56k.c: drop check for negativity of unsigned parameter [linux-3.16-rc5/drivers/char/dsp56k.c:386]: (style) Checking if unsigned variable 'arg' is less than zero. Source code is if (arg > 31 || arg < 0) return -EINVAL; But static long dsp56k_ioctl(struct file *file, unsigned int cmd, unsigned long arg) Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80411 Reported-by: David Binderman Signed-off-by: Andrey Utkin Signed-off-by: Greg Kroah-Hartman --- drivers/char/dsp56k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index 01a5ca7..8bf70e8 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c @@ -383,7 +383,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd, return put_user(status, &hf->status); } case DSP56K_HOST_CMD: - if (arg > 31 || arg < 0) + if (arg > 31) return -EINVAL; mutex_lock(&dsp56k_mutex); dsp56k_host_interface.cvr = (u_char)((arg & DSP56K_CVR_HV_MASK) | -- cgit v1.1