From: Kai Ye <yekai13@huawei.com>
To: <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<wangzhou1@hisilicon.com>, <yekai13@huawei.com>
Subject: [PATCH v4 1/2] crypto: hisilicon/sec - fix the abnormal exiting process
Date: Fri, 13 Aug 2021 15:41:01 +0800 [thread overview]
Message-ID: <1628840462-25437-2-git-send-email-yekai13@huawei.com> (raw)
In-Reply-To: <1628840462-25437-1-git-send-email-yekai13@huawei.com>
Because the algs registration process has added a judgment.
So need to add the judgment for the abnormal exiting process.
Signed-off-by: Kai Ye <yekai13@huawei.com>
---
drivers/crypto/hisilicon/sec2/sec_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
index db4dbcf..45a1ddd 100644
--- a/drivers/crypto/hisilicon/sec2/sec_main.c
+++ b/drivers/crypto/hisilicon/sec2/sec_main.c
@@ -1020,7 +1020,8 @@ static int sec_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
err_alg_unregister:
- hisi_qm_alg_unregister(qm, &sec_devices);
+ if (qm->qp_num >= ctx_q_num)
+ hisi_qm_alg_unregister(qm, &sec_devices);
err_qm_stop:
sec_debugfs_exit(qm);
hisi_qm_stop(qm, QM_NORMAL);
--
2.7.4
next prev parent reply other threads:[~2021-08-13 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 7:41 [PATCH v4 0/2] crypto: hisilicon - some misc bugfix for SEC engine Kai Ye
2021-08-13 7:41 ` Kai Ye [this message]
2021-08-13 7:41 ` [PATCH v4 2/2] crypto: hisilicon/sec - modify the hardware endian configuration Kai Ye
2021-08-21 7:50 ` [PATCH v4 0/2] crypto: hisilicon - some misc bugfix for SEC engine Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1628840462-25437-2-git-send-email-yekai13@huawei.com \
--to=yekai13@huawei.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangzhou1@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).