]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
um: return negative in tuntap_open_tramp()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Aug 2017 10:19:58 +0000 (13:19 +0300)
committerRichard Weinberger <richard@nod.at>
Wed, 13 Sep 2017 20:36:50 +0000 (22:36 +0200)
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>
arch/um/os-Linux/drivers/tuntap_user.c

index c2e6e1dad8763b2547269fc242e12ecf72cd08ab..db24ce0d09a6443fc18e7d1a69acc7971ecd11d9 100644 (file)
@@ -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);