summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/ucm.c
diff options
context:
space:
mode:
authorHefty, Sean <sean.hefty@intel.com>2011-10-06 20:33:05 +0400
committerRoland Dreier <roland@purestorage.com>2011-10-06 20:33:05 +0400
commitcaf6e3f221ddc12ccabd1cd0ba149561db0090d4 (patch)
tree99790c5bdeb1ed62eb0262d78f6f5a7563def9bc /drivers/infiniband/core/ucm.c
parentb7ab0b19a85fffaa04ad0b59471d3a607eef0a56 (diff)
downloadlinux-caf6e3f221ddc12ccabd1cd0ba149561db0090d4.tar.xz
RDMA/ucm: Removed checks for unsigned value < 0
cmd is unsigned, no need to check for < 0. Found by code inspection. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core/ucm.c')
-rw-r--r--drivers/infiniband/core/ucm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index 08f948df8fa9..b8a0b4a7811b 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1122,7 +1122,7 @@ static ssize_t ib_ucm_write(struct file *filp, const char __user *buf,
if (copy_from_user(&hdr, buf, sizeof(hdr)))
return -EFAULT;
- if (hdr.cmd < 0 || hdr.cmd >= ARRAY_SIZE(ucm_cmd_table))
+ if (hdr.cmd >= ARRAY_SIZE(ucm_cmd_table))
return -EINVAL;
if (hdr.in + sizeof(hdr) > len)