diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/link.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 284d6383ad6..d1a764b9b2d 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1020,12 +1020,9 @@ exit: read_unlock_bh(&tipc_net_lock); /* Couldn't find a link to the destination node */ - if (buf) - return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); - if (res >= 0) - return tipc_port_iovec_reject(sender, hdr, msg_sect, len, - TIPC_ERR_NO_NODE); - return res; + kfree_skb(buf); + tipc_port_iovec_reject(sender, hdr, msg_sect, len, TIPC_ERR_NO_NODE); + return -ENETUNREACH; } /* @@ -1163,8 +1160,9 @@ error: } else { reject: kfree_skb_list(buf_chain); - return tipc_port_iovec_reject(sender, hdr, msg_sect, - len, TIPC_ERR_NO_NODE); + tipc_port_iovec_reject(sender, hdr, msg_sect, len, + TIPC_ERR_NO_NODE); + return -ENETUNREACH; } /* Append chain of fragments to send queue & send them */ |