summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-10-25 13:12:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-26 09:56:58 +0100
commit160149299f71c36770be6e627f035bd2377ac3ab (patch)
treeb6d1ac94b95311d75610cbc4e815eaf561254f39 /drivers
parent46e47543175b6784b02f7b587ef83b44fd2c8f7d (diff)
IB/hfi1: Remove incorrect IS_ERR check
commit 2b16056f845207967a32497f41cf92b57849f934 upstream. Remove IS_ERR check from caching code as the function being called does not actually return error pointers. Fixes: f19bd643dbde: "IB/hfi1: Prevent NULL pointer deferences in caching code" Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/hfi1/user_sdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c
index 1694037d1eee..8f59a4fded93 100644
--- a/drivers/infiniband/hw/hfi1/user_sdma.c
+++ b/drivers/infiniband/hw/hfi1/user_sdma.c
@@ -1152,7 +1152,7 @@ static int pin_vector_pages(struct user_sdma_request *req,
rb_node = hfi1_mmu_rb_extract(pq->handler,
(unsigned long)iovec->iov.iov_base,
iovec->iov.iov_len);
- if (rb_node && !IS_ERR(rb_node))
+ if (rb_node)
node = container_of(rb_node, struct sdma_mmu_node, rb);
else
rb_node = NULL;