aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_main.c
diff options
context:
space:
mode:
authorHefty, Sean <sean.hefty@intel.com>2011-10-06 09:33:05 -0700
committerRoland Dreier <roland@purestorage.com>2011-10-06 09:33:05 -0700
commitcaf6e3f221ddc12ccabd1cd0ba149561db0090d4 (patch)
tree99790c5bdeb1ed62eb0262d78f6f5a7563def9bc /drivers/infiniband/core/uverbs_main.c
parentIB/mad: Verify mgmt class in received MADs (diff)
downloadlinux-dev-caf6e3f221ddc12ccabd1cd0ba149561db0090d4.tar.xz
linux-dev-caf6e3f221ddc12ccabd1cd0ba149561db0090d4.zip
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 '')
-rw-r--r--drivers/infiniband/core/uverbs_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 56898b6578a4..7c30e1e12c90 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -557,8 +557,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
if (hdr.in_words * 4 != count)
return -EINVAL;
- if (hdr.command < 0 ||
- hdr.command >= ARRAY_SIZE(uverbs_cmd_table) ||
+ if (hdr.command >= ARRAY_SIZE(uverbs_cmd_table) ||
!uverbs_cmd_table[hdr.command])
return -EINVAL;