Skip to content

Commit ccf1236

Browse files
Zhen Leirichardweinberger
authored andcommitted
um: fix error return code in winch_tramp()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 89df6bf ("uml: DEBUG_SHIRQ fixes") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Acked-By: anton.ivanov@cambridgegreys.com Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent b77e81f commit ccf1236

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/um/drivers/chan_user.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
256256
goto out_close;
257257
}
258258

259-
if (os_set_fd_block(*fd_out, 0)) {
259+
err = os_set_fd_block(*fd_out, 0);
260+
if (err) {
260261
printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd "
261262
"non-blocking.\n");
262263
goto out_close;

0 commit comments

Comments
 (0)