Skip to content

Commit

Permalink
um: return negative in tuntap_open_tramp()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Richard Weinberger committed Sep 13, 2017
1 parent 7b24afb commit 6d20e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/os-Linux/drivers/tuntap_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6d20e6b

Please sign in to comment.