All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] um: fix error return code in slip_open()
@ 2021-05-08  3:13 ` Zhen Lei
  0 siblings, 0 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-08  3:13 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger, Anton Ivanov, Andrew Morton,
	linux-um, linux-kernel
  Cc: Zhen Lei

Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: a3c77c67a443 ("[PATCH] uml: slirp and slip driver cleanups and fixes")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/um/drivers/slip_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index 482a19c5105c..7334019c9e60 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -145,7 +145,8 @@ static int slip_open(void *data)
 	}
 	sfd = err;
 
-	if (set_up_tty(sfd))
+	err = set_up_tty(sfd);
+	if (err)
 		goto out_close2;
 
 	pri->slave = sfd;
-- 
2.25.1



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

end of thread, other threads:[~2021-05-08  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  3:13 [PATCH 1/1] um: fix error return code in slip_open() Zhen Lei
2021-05-08  3:13 ` Zhen Lei
2021-05-08  9:13 ` Anton Ivanov
2021-05-08  9:13   ` Anton Ivanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.