]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
IB/hfi1: Remove incorrect IS_ERR check
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Tue, 25 Oct 2016 20:12:46 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2016 08:56:58 +0000 (09:56 +0100)
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>
drivers/infiniband/hw/hfi1/user_sdma.c

index 1694037d1eee287b34559cadf11ab2bf5019ea80..8f59a4fded937531a9d7f59f3fca22bbd27f9b11 100644 (file)
@@ -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;