aboutsummaryrefslogtreecommitdiff
path: root/arch/um
diff options
context:
space:
mode:
authorDaniel Walter2019-04-02 10:43:32 +0200
committerRichard Weinberger2019-05-07 23:18:28 +0200
commit9ca55299f2ee0a2ccf41d99bfc02d5ad3118e03b (patch)
tree51c2a5a533c3561be6dbb4325ed520ae985903f0 /arch/um
parent91e1e547abcd88f1e23204e62e377aaa7c93a786 (diff)
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: Daniel Walter <dwalter@google.com> Reviewed-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/ubd_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index aca09be2373e..33c1cd6a12ac 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -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);