mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
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>
This commit is contained in:
parent
91e1e547ab
commit
9ca55299f2
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue