]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: make get_virtfn_info() provide physical PCI device
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 1 Feb 2023 14:39:43 +0000 (23:39 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 1 Feb 2023 23:41:48 +0000 (23:41 +0000)
Fixes a bug introduced by 78463c6c4fdcb703bc0dc694c3ea77df3c5624e0.

Fixes #25545.

src/udev/udev-builtin-net_id.c

index 557e4591912fb3be1f06208b7b06e8135b2a6b60..a48d5dedf8066cdcb87613235ce491ce7b7e9020 100644 (file)
@@ -144,7 +144,7 @@ static int get_virtfn_info(sd_device *pcidev, sd_device **ret_physfn_pcidev, cha
                         if (!suffix)
                                 return -ENOMEM;
 
-                        *ret_physfn_pcidev = sd_device_ref(child);
+                        *ret_physfn_pcidev = sd_device_ref(physfn_pcidev);
                         *ret_suffix = suffix;
                         return 0;
                 }