diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-18 11:37:17 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-18 16:38:51 +0200 |
commit | 4fb588c34ee9b64333ad39ab039d657cf6e958ab (patch) | |
tree | 2f8dc62fc7d6fff52aa3b3b3ab3939173b4d1c85 | |
parent | 6b701c3a48aede064850f7b3d16021d60fa8e541 (diff) | |
download | lvm2-4fb588c34ee9b64333ad39ab039d657cf6e958ab.tar.gz |
cleanup: dmeventd reorder _fill_device_data
Just simplify the function.
-rw-r--r-- | daemons/dmeventd/dmeventd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 4f059b9ab..a907ca6b0 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -404,6 +404,7 @@ static int _fill_device_data(struct thread_status *ts) { struct dm_task *dmt; struct dm_info dmi; + int ret = 0; if (!ts->device.uuid) return 0; @@ -426,16 +427,11 @@ static int _fill_device_data(struct thread_status *ts) ts->device.major = dmi.major; ts->device.minor = dmi.minor; - - dm_task_destroy(dmt); - return 1; - - fail: + ret = 1; +fail: dm_task_destroy(dmt); - dm_free(ts->device.name); - ts->device.name = NULL; - return 0; + return ret; } /* |