diff options
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 43f89ba0a908..fe89c4660d55 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -717,11 +717,13 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
717 | { | 717 | { |
718 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 718 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
719 | struct ipoib_neigh *neigh; | 719 | struct ipoib_neigh *neigh; |
720 | struct neighbour *n; | 720 | struct neighbour *n = NULL; |
721 | unsigned long flags; | 721 | unsigned long flags; |
722 | 722 | ||
723 | n = dst_get_neighbour(skb_dst(skb)); | 723 | if (likely(skb_dst(skb))) |
724 | if (likely(skb_dst(skb) && n)) { | 724 | n = dst_get_neighbour(skb_dst(skb)); |
725 | |||
726 | if (likely(n)) { | ||
725 | if (unlikely(!*to_ipoib_neigh(n))) { | 727 | if (unlikely(!*to_ipoib_neigh(n))) { |
726 | ipoib_path_lookup(skb, dev); | 728 | ipoib_path_lookup(skb, dev); |
727 | return NETDEV_TX_OK; | 729 | return NETDEV_TX_OK; |