wr->opcode is unsigned; checking if it is negative is unnecessary. Fix
this issue by removing the check.
Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
Link: https://lore.kernel.org/r/20230605183728.47021-1-bryantan@vmware.com
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/07c48eee-0aca-48ee-897a-38588c341c41@kili.mountain
Signed-off-by: Bryan Tan <bryantan@vmware.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
goto out;
}
- if (unlikely(wr->opcode < 0)) {
- dev_warn_ratelimited(&dev->pdev->dev,
- "invalid send opcode\n");
- *bad_wr = wr;
- ret = -EINVAL;
- goto out;
- }
-
/*
* Only support UD, RC.
* Need to check opcode table for thorough checking.