summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-08-21 22:48:37 +0200
committerMark Brown <broonie@kernel.org>2017-08-21 22:48:37 +0200
commitf13db334bf7b68b0086d04ab6a51517ba41123b4 (patch)
tree1ce74e775b64e9804aa5bbece3cdc94fd309912b /net/ipv4/route.c
parentASoC: codecs: constify snd_soc_dai_ops structures (diff)
parentASoC: qcom: apq8016-sbc: Add support to Headset JACK (diff)
downloadlinux-f13db334bf7b68b0086d04ab6a51517ba41123b4.tar.xz
linux-f13db334bf7b68b0086d04ab6a51517ba41123b4.zip
Merge branch 'topic/msm8916' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-const
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 0383e66f59bc..7effa62beed3 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2750,12 +2750,13 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
err = 0;
if (IS_ERR(rt))
err = PTR_ERR(rt);
+ else
+ skb_dst_set(skb, &rt->dst);
}
if (err)
goto errout_free;
- skb_dst_set(skb, &rt->dst);
if (rtm->rtm_flags & RTM_F_NOTIFY)
rt->rt_flags |= RTCF_NOTIFY;