Commit 9ca55299 authored by Daniel Walter's avatar Daniel Walter Committed by Richard Weinberger

um: Do not unlock mutex that is not hold.

Return error instead of trying to unlock a mutex that is not hold.
Signed-off-by: default avatarDaniel Walter <dwalter@google.com>
Reviewed-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Acked-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 91e1e547
......@@ -276,14 +276,14 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
str++;
if(!strcmp(str, "sync")){
global_openflags = of_sync(global_openflags);
goto out1;
return err;
}
err = -EINVAL;
major = simple_strtoul(str, &end, 0);
if((*end != '\0') || (end == str)){
*error_out = "Didn't parse major number";
goto out1;
return err;
}
mutex_lock(&ubd_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment