summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-08-25 13:19:58 +0300
committerRichard Weinberger <richard@nod.at>2017-09-13 23:36:50 +0300
commit6d20e6b235aad0be463b23588093b079362bb2e4 (patch)
tree14ac8cd0d6250f376708440da3c583314d57023b /arch
parent7b24afbfe30b38d59cca7543a352b03848330d91 (diff)
downloadlinux-6d20e6b235aad0be463b23588093b079362bb2e4.tar.xz
um: return negative in tuntap_open_tramp()
The intention is to return negative error codes. "pid" is already negative but we accidentally negate it again back to positive. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index c2e6e1dad876..db24ce0d09a6 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -80,7 +80,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote,
pid = run_helper(tuntap_pre_exec, &data, argv);
if (pid < 0)
- return -pid;
+ return pid;
close(remote);