crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set()
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Fri, 11 Nov 2022 10:00:36 +0000 (18:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:33 +0000 (13:32 +0100)
commitf98601f9abde04a800a17f6e86c6c7f3eb524ed9
tree2b4b04b933e01b21eac4a465e20e0df9ce39fb60
parentb5be6724f222890f407d499e2d3daa2dfa7bfcc8
crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set()

[ Upstream commit cc7710d0d4ebc6998f04035cde4f32c5ddbe9d7f ]

pci_get_device() will increase the reference count for the returned
pci_dev. We need to use pci_dev_put() to decrease the reference count
before q_num_set() returns.

Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/hisi_acc_qm.h