]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 28 Nov 2022 06:55:12 +0000 (14:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:40:55 +0000 (11:40 +0100)
commitea576c63a5669015341024e6665c3b7e6145665c
tree05739c7563985e6cefc6178475fc2ead3e7539f3
parent0ef303d178d0f2df27b4e3376e0f4e0ccb8a0b46
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()

[ Upstream commit 5044debb9cf0a7a4798c6703d1c4a148ef1dea02 ]

As the comment of pci_get_domain_bus_and_slot() says, it returns
a PCI device with refcount incremented, so it doesn't need to
call an extra pci_dev_get() in pci_get_dev_wrapper(), and the PCI
device needs to be put in the error path.

Fixes: cc515bd8dc94 ("EDAC, i10nm: Add a driver for Intel 10nm server processors")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20221128065512.3572550-1-yangyingliang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/i10nm_base.c