Commit 4e8884ed authored by Denis Bolotin's avatar Denis Bolotin Committed by Kleber Sacilotto de Souza

qed: Fix PTT leak in qed_drain()

BugLink: https://bugs.launchpad.net/bugs/1811077

[ Upstream commit 9aaa4e8b ]

Release PTT before entering error flow.
Signed-off-by: default avatarDenis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: default avatarMichal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent d68a32de
...@@ -1126,9 +1126,9 @@ static int qed_drain(struct qed_dev *cdev) ...@@ -1126,9 +1126,9 @@ static int qed_drain(struct qed_dev *cdev)
return -EBUSY; return -EBUSY;
} }
rc = qed_mcp_drain(hwfn, ptt); rc = qed_mcp_drain(hwfn, ptt);
qed_ptt_release(hwfn, ptt);
if (rc) if (rc)
return rc; return rc;
qed_ptt_release(hwfn, ptt);
} }
return 0; return 0;
......
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