appletalk: fix erroneous return value
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 17 Feb 2016 15:53:59 +0000 (10:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 19:59:34 +0000 (14:59 -0500)
The atalk_sendmsg() function might return wrong value ENETUNREACH
instead of -ENETUNREACH.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/appletalk/ddp.c

index d5871ac493eb10c984b9e74f2beee3049bc79645..f066781be3c856b8ae192c6b74d614597297a872 100644 (file)
@@ -1625,7 +1625,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
 
                rt = atrtr_find(&at_hint);
        }
-       err = ENETUNREACH;
+       err = -ENETUNREACH;
        if (!rt)
                goto out;