Skip to content
Commit 7dec1453 authored by Yang Yingliang's avatar Yang Yingliang Committed by Guenter Roeck
Browse files

hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new()



As comment of pci_get_domain_bus_and_slot() says, it returns
a pci device with refcount increment, when finish using it,
the caller must decrement the reference count by calling
pci_dev_put(). So call it after using to avoid refcount leak.

Fixes: 14513ee6 ("hwmon: (coretemp) Use PCI host bridge ID to identify CPU if necessary")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221118093303.214163-1-yangyingliang@huawei.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent a89ff5f5
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