Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148054965
D50153.1785233912.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
806 B
Referenced Files
None
Subscribers
None
D50153.1785233912.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -287,18 +287,22 @@
struct pci_dev *
lkpi_pci_get_device(uint16_t vendor, uint16_t device, struct pci_dev *odev)
{
- struct pci_dev *pdev;
+ struct pci_dev *pdev, *found;
KASSERT(odev == NULL, ("%s: odev argument not yet supported\n", __func__));
+ found = NULL;
spin_lock(&pci_lock);
list_for_each_entry(pdev, &pci_devices, links) {
- if (pdev->vendor == vendor && pdev->device == device)
+ if (pdev->vendor == vendor && pdev->device == device) {
+ found = pdev;
break;
+ }
}
+ pci_dev_get(found);
spin_unlock(&pci_lock);
- return (pdev);
+ return (found);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 28, 10:18 AM (17 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29289679
Default Alt Text
D50153.1785233912.diff (806 B)
Attached To
Mode
D50153: LinuxKPI: pci: fix two errors in lkpi_pci_get_device()
Attached
Detach File
Event Timeline
Log In to Comment