mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]  um: Do not unlock mutex that is not hold.
@ 2019-04-02  8:43 Daniel Walter
  2019-04-05 16:17 ` Anton Ivanov
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Walter @ 2019-04-02  8:43 UTC (permalink / raw)
  To: richard, linux-um; +Cc: linux-kernel, Daniel Walter

 Return error instead of trying to unlock a mutex that is not hold.

Signed-off-by: Daniel Walter <dwalter@google.com>
---
 arch/um/drivers/ubd_kern.c | 4 ++--
 1 file 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);
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-05 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02  8:43 [PATCH] um: Do not unlock mutex that is not hold Daniel Walter
2019-04-05 16:17 ` Anton Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome