提交 2b16056f 编写于 作者: D Dennis Dalessandro 提交者: Doug Ledford

IB/hfi1: Remove incorrect IS_ERR check

Remove IS_ERR check from caching code as the function being called does
not actually return error pointers.

Fixes: f19bd643: "IB/hfi1: Prevent NULL pointer deferences in caching code"
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NDean Luick <dean.luick@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 09a7908b
......@@ -1144,7 +1144,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册