OSDN Git Service

RDMA/bnxt_re: Avoid accessing nq->bar_reg_iomem in failure case
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 8 Oct 2018 10:27:56 +0000 (03:27 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Oct 2018 06:03:50 +0000 (00:03 -0600)
commited51efd2ce44091a858ad829f666727e7c95695e
tree374e962a3146d7e75a6f1ff93af22e021ef0d716
parenteae4ad1b0c9a77ef0cbac212d58d46976eaacfc1
RDMA/bnxt_re: Avoid accessing nq->bar_reg_iomem in failure case

In the failure path, nq->bar_reg_iomem gets accessed without
initializing. Avoid this by calling the bnxt_qplib_nq_stop_irq only if the
initialization is complete.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Fixes: 6e04b1035689 ("RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/qplib_fp.c