]> Git Repo - linux.git/commitdiff
um: return negative in tuntap_open_tramp()
authorDan Carpenter <[email protected]>
Fri, 25 Aug 2017 10:19:58 +0000 (13:19 +0300)
committerRichard Weinberger <[email protected]>
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 <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
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);
 
This page took 0.06018 seconds and 4 git commands to generate.