summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Bolotin <denis.bolotin@cavium.com>2018-11-12 12:50:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-13 09:21:34 +0100
commit30d5a7c1b6c06fad598f5fbd71b513625c462bc5 (patch)
treeeb6e6a995f6c7943c0f998ee2c60e5bb090afa60
parent61d221fce277b626618a9a3ed232e8ce73f35d67 (diff)
qed: Fix PTT leak in qed_drain()
[ Upstream commit 9aaa4e8ba12972d674caeefbc5f88d83235dd697 ] Release PTT before entering error flow. Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com> Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 35e1468d8196..b8ae6ed5c7ba 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1124,9 +1124,9 @@ static int qed_drain(struct qed_dev *cdev)
return -EBUSY;
}
rc = qed_mcp_drain(hwfn, ptt);
+ qed_ptt_release(hwfn, ptt);
if (rc)
return rc;
- qed_ptt_release(hwfn, ptt);
}
return 0;