[bug report] RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Devesh Sharma,

The patch 6e04b1035689: "RDMA/bnxt_re: Fix broken RoCE driver due to
recent L2 driver changes" from May 25, 2018, leads to the following
static checker warning:

	drivers/infiniband/hw/bnxt_re/qplib_fp.c:471 bnxt_qplib_nq_start_irq()
	warn: 'nq->msix_vec' not released on lines: 471.

drivers/infiniband/hw/bnxt_re/qplib_fp.c
   441  int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
   442                              int msix_vector, bool need_init)
   443  {
   444          int rc;
   445  
   446          if (nq->requested)
   447                  return -EFAULT;
   448  
   449          nq->msix_vec = msix_vector;
   450          if (need_init)
   451                  tasklet_setup(&nq->nq_tasklet, bnxt_qplib_service_nq);
   452          else
   453                  tasklet_enable(&nq->nq_tasklet);
   454  
   455          snprintf(nq->name, sizeof(nq->name), "bnxt_qplib_nq-%d", nq_indx);
   456          rc = request_irq(nq->msix_vec, bnxt_qplib_nq_irq, 0, nq->name, nq);
   457          if (rc)
   458                  return rc;
   459  
   460          cpumask_clear(&nq->mask);
   461          cpumask_set_cpu(nq_indx, &nq->mask);
   462          rc = irq_set_affinity_hint(nq->msix_vec, &nq->mask);
   463          if (rc) {
   464                  dev_warn(&nq->pdev->dev,
   465                           "set affinity failed; vector: %d nq_idx: %d\n",
   466                           nq->msix_vec, nq_indx);

Say irq_set_affinity_hint() fails then should we call release_irq()?

   467          }
   468          nq->requested = true;
   469          bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, nq->res->cctx, true);
   470  
   471          return rc;

I think that maybe the intent was to "return 0;" here even if setting
the hint failed.

   472  }

regards,
dan carpenter



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux