summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 8b65a12654e7..26ca2f2d37ce 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1618,8 +1618,8 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};
-
- if (ip_route_output_key(net, &rt, &fl))
+ rt = ip_route_output_key(net, &fl);
+ if (IS_ERR(rt))
goto out_free;
encap = sizeof(struct iphdr);
} else {
@@ -1629,8 +1629,8 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};
-
- if (ip_route_output_key(net, &rt, &fl))
+ rt = ip_route_output_key(net, &fl);
+ if (IS_ERR(rt))
goto out_free;
}
OpenPOWER on IntegriCloud