Commit e52fe10
committed
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165650
Tested: tested with the EMR machine we have in the lab
commit 9c89215
Author: Yang Yingliang <yangyingliang@huawei.com>
Date: Mon Nov 28 14:55:12 2022 +0800
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
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: d4dc89d ("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: Aristeu Rozanski <arozansk@redhat.com>1 parent 73267f7 commit e52fe10
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
309 | | - | |
310 | 309 | | |
311 | 310 | | |
312 | 311 | | |
| |||
0 commit comments