udev: do not ignore -ENOENT from sd_device_get_devname() for block device

We already checked that the sd_device object 'dev' is for a whole block
device. So, -ENOENT should not be triggeered here, and if it is, there
exists something spurious. Hence we should not ignore the failure.
This commit is contained in:
Yu Watanabe
2022-09-18 23:32:24 +09:00
parent 8f71534e06
commit d50c55bd43
-2
View File
@@ -495,8 +495,6 @@ static int device_get_whole_disk(sd_device *dev, sd_device **ret_device, const c
return log_device_debug_errno(dev, r, "Failed to get whole disk device: %m");
r = sd_device_get_devname(dev, &val);
if (r == -ENOENT)
goto irrelevant;
if (r < 0)
return log_device_debug_errno(dev, r, "Failed to get devname: %m");