summaryrefslogtreecommitdiff
path: root/drivers/char/dsp56k.c
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>2014-07-17 16:18:53 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-18 05:38:37 +0400
commit389345cf6d71914b39130b1ea04dab1b7bacf6bd (patch)
tree609495e2bb25b871e332d427a4ea9e6de647c762 /drivers/char/dsp56k.c
parentfe2f17eb3da38ac0d5a00c511255bf3a33d16d24 (diff)
downloadlinux-389345cf6d71914b39130b1ea04dab1b7bacf6bd.tar.xz
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 <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/dsp56k.c')
-rw-r--r--drivers/char/dsp56k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 01a5ca7425d7..8bf70e8c3f79 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) |