From: Wenkai Lin <linwenkai6@hisilicon.com> driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/10368 CVE: NA ---------------------------------------------------------------------- The n and size arguments of devm_kcalloc in qm_pre_store_caps() are swapped. Fix the order to match the kcalloc(n, size, flags) convention. Fixes: 5a981b9ed12b ("crypto: hisilicon/qm - replace devm_kzalloc with devm_kcalloc") Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Ruibin Deng <dengruibin@h-partners.com> --- drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 636f1886aa8f..be8234664def 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -5909,7 +5909,7 @@ static int qm_pre_store_caps(struct hisi_qm *qm) size_t i, size; size = ARRAY_SIZE(qm_cap_query_info); - qm_cap = devm_kcalloc(&pdev->dev, sizeof(*qm_cap), size, GFP_KERNEL); + qm_cap = devm_kcalloc(&pdev->dev, size, sizeof(*qm_cap), GFP_KERNEL); if (!qm_cap) return -ENOMEM; -- 2.43.0