diff --git a/drivers/md/dm.c b/drivers/md/dm.c index fa9b1cb4438a6ff15b71d2fdf253834c553bd5f8..c0742129a9cbe7153fd9934db470874045a0da03 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2249,10 +2249,11 @@ static int __dm_resume(struct mapped_device *md, struct dm_table *map) int dm_resume(struct mapped_device *md) { - int r = -EINVAL; + int r; struct dm_table *map = NULL; retry: + r = -EINVAL; mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING); if (!dm_suspended_md(md)) @@ -2276,8 +2277,6 @@ int dm_resume(struct mapped_device *md) goto out; clear_bit(DMF_SUSPENDED, &md->flags); - - r = 0; out: mutex_unlock(&md->suspend_lock);