If reading the sysattr failed with such error, the whole operation in
net_id builtin command will fail, and the interface will not be renamed.
Fixes a bug introduced by
5bbcfbaa11a92732f9bbc8d5f77e9311e6ac3d56.
if (r < 0 && r != -ENOENT)
return r;
- r = sd_device_get_sysattr_value(dev, "phys_port_name", &info->phys_port_name);
- if (r < 0 && r != -ENOENT)
- return r;
+ (void) sd_device_get_sysattr_value(dev, "phys_port_name", &info->phys_port_name);
r = sd_device_get_sysattr_value(dev, "address", &s);
if (r < 0 && r != -ENOENT)