Thread (8 messages) 8 messages, 1 author, 2016-09-02
STALE3596d
Revisions (3)
  1. rfc [diff vs current]
  2. v4 current
  3. v5 [diff vs current]

[PATCH v4 1/6] iw_cxgb4: call dev_put() on l2t allocation failure

From: Steve Wise <hidden>
Date: 2016-09-01 13:43:46
Also in: linux-nvme
Subsystem: cxgb4 iwarp rnic driver (iw_cxgb4), infiniband subsystem, the rest · Maintainers: Potnuri Bharat Teja, Jason Gunthorpe, Leon Romanovsky, Linus Torvalds

Reviewed-by: Sagi Grimberg <sagi-Eyp3ogxVSr5BDLzU/O5InQ@public.gmane.org>
Reviewed-by: Christoph Hellwig <redacted>
Signed-off-by: Steve Wise <redacted>
---
 drivers/infiniband/hw/cxgb4/cm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index b6a953a..434a7fb 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2117,8 +2117,10 @@ static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip,
 		}
 		ep->l2t = cxgb4_l2t_get(cdev->rdev.lldi.l2t,
 					n, pdev, rt_tos2priority(tos));
-		if (!ep->l2t)
+		if (!ep->l2t) {
+			dev_put(pdev);
 			goto out;
+		}
 		ep->mtu = pdev->mtu;
 		ep->tx_chan = cxgb4_port_chan(pdev);
 		ep->smac_idx = cxgb4_tp_smt_idx(adapter_type,
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help