]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ocrdma: Fix an error code in ocrdma_alloc_pd()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:46:14 +0000 (10:46 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jul 2017 15:20:49 +0000 (11:20 -0400)
commit31f2060529a16d8f276e98cb5378889b06dbdb56
tree1c00d9c1cf14071a97120ec7a5538ac551ba1cb3
parent382a2b9d66cd75e664bc8c947885bfb763e4921f
RDMA/ocrdma: Fix an error code in ocrdma_alloc_pd()

We should preserve the original "status" error code instead of resetting
it to zero.  Returning ERR_PTR(0) is the same as NULL and results in a
NULL dereference in the callers.  I added a printk() on error instead.

Fixes: 90a8e8be7691 ("RDMA/ocrdma: Cache recv DB until QP moved to RTR")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c