Skip to content

Commit aab881d

Browse files
Zhen Leigregkh
authored andcommitted
um: fix error return code in winch_tramp()
[ Upstream commit ccf1236 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9bb3f31 commit aab881d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎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)