IB/cxgb3: Fix error codes in iwch_alloc_mr()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:48:00 +0000 (10:48 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jul 2017 15:20:49 +0000 (11:20 -0400)
commit9064d6055c14f700aa13f7c72fd3e63d12bee643
treeb638689f886be6aa1cd4652f9f0d5c13f3c007f0
parent6ebedacbb44602d4dec3348dee5ec31dd9b09521
IB/cxgb3: Fix error codes in iwch_alloc_mr()

We accidentally don't set the error code on some error paths.  It means
return ERR_PTR(0) which is NULL and results in a NULL dereference in the
caller.

Fixes: 13a239330abd ("RDMA/cxgb3: Don't ignore insert_handle() failures")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb3/iwch_provider.c