diff options
author | Hefty, Sean <sean.hefty@intel.com> | 2011-10-06 12:33:05 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-06 12:33:05 -0400 |
commit | caf6e3f221ddc12ccabd1cd0ba149561db0090d4 (patch) | |
tree | 99790c5bdeb1ed62eb0262d78f6f5a7563def9bc /drivers/infiniband/core/ucma.c | |
parent | b7ab0b19a85fffaa04ad0b59471d3a607eef0a56 (diff) |
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/ucma.c')
-rw-r--r-- | drivers/infiniband/core/ucma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 71be5eebd68..b3f3dddd528 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c | |||
@@ -1270,7 +1270,7 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf, | |||
1270 | if (copy_from_user(&hdr, buf, sizeof(hdr))) | 1270 | if (copy_from_user(&hdr, buf, sizeof(hdr))) |
1271 | return -EFAULT; | 1271 | return -EFAULT; |
1272 | 1272 | ||
1273 | if (hdr.cmd < 0 || hdr.cmd >= ARRAY_SIZE(ucma_cmd_table)) | 1273 | if (hdr.cmd >= ARRAY_SIZE(ucma_cmd_table)) |
1274 | return -EINVAL; | 1274 | return -EINVAL; |
1275 | 1275 | ||
1276 | if (hdr.in + sizeof(hdr) > len) | 1276 | if (hdr.in + sizeof(hdr) > len) |