Commit 609e941a authored by Steve Wise's avatar Steve Wise Committed by Sagi Grimberg

iw_cxgb4: call dev_put() on l2t allocation failure

Reviewed-by: 's avatarSagi Grimberg <sagi@grimbrg.me>
Reviewed-by: 's avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: 's avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: 's avatarSagi Grimberg <sagi@grimberg.me>
parent 4d8c6a79
......@@ -2077,8 +2077,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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment