udev: ignore empty SR-IOV VF suffix

It should not happen. Just for safety.
This commit is contained in:
Yu Watanabe
2022-08-05 21:49:27 +09:00
parent 68a52f5973
commit 59611eb9b8
+1 -1
View File
@@ -126,7 +126,7 @@ static int get_virtfn_info(sd_device *pcidev, sd_device **ret_physfn_pcidev, cha
const char *n, *s;
n = startswith(de->d_name, "virtfn");
if (!n)
if (isempty(n))
continue;
if (sd_device_new_child(&virtfn_pcidev, physfn_pcidev, de->d_name) < 0)