- dev = sysfs_device_get(uev->devpath);
- if (!dev) {
- condlog(2, "%s: not found in sysfs", uev->devpath);
- return 1;
- }
condlog(2, "%s: remove path (uevent)", uev->kernel);
- retval = ev_remove_path(uev->kernel, vecs);
-
- if (!retval)
- sysfs_device_put(dev);
-
- return retval;
+ return ev_remove_path(uev->kernel, vecs);
}
int
@@ -679,14 +661,8 @@ fail:
static int
uev_update_path (struct uevent *uev, struct vectors * vecs)
{
- struct sysfs_device * dev;
int retval, ro;
- dev = sysfs_device_get(uev->devpath);
- if (!dev) {
- condlog(2, "%s: not found in sysfs", uev->devpath);
- return 1;
- }
ro = uevent_get_disk_ro(uev);
- dev = sysfs_device_get(uev->devpath);
- if (!dev) {
- condlog(2, "%s: not found in sysfs", uev->devpath);
- return 1;
- }
condlog(2, "%s: remove path (uevent)", uev->kernel);
- retval = ev_remove_path(uev->kernel, vecs);
-
- if (!retval)
- sysfs_device_put(dev);
-
- return retval;
+ return ev_remove_path(uev->kernel, vecs);
}
int
@@ -679,14 +661,8 @@ fail:
static int
uev_update_path (struct uevent *uev, struct vectors * vecs)
{
- struct sysfs_device * dev;
int retval, ro;
- dev = sysfs_device_get(uev->devpath);
- if (!dev) {
- condlog(2, "%s: not found in sysfs", uev->devpath);
- return 1;
- }
ro = uevent_get_disk_ro(uev);