summaryrefslogtreecommitdiffstats
path: root/drivers/nubus
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2022-12-02 21:22:33 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2022-12-09 18:45:00 +0800
commitecadb5b0111ea19fc7c240bb25d424a94471eb7d (patch)
tree9eb89360de57607ab7c5c4b1149bab767b1f0399 /drivers/nubus
parent18daae5b0c41bf54af5f162a3e205858c9771400 (diff)
downloadlinux-ecadb5b0111ea19fc7c240bb25d424a94471eb7d.tar.gz
linux-ecadb5b0111ea19fc7c240bb25d424a94471eb7d.tar.bz2
linux-ecadb5b0111ea19fc7c240bb25d424a94471eb7d.zip
hwrng: amd - Fix PCI device refcount leak
for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL. If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. Add the missing pci_dev_put() for the normal and error path. Fixes: 96d63c0297cc ("[PATCH] Add AMD HW RNG driver") Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/nubus')
0 files changed, 0 insertions, 0 deletions