diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cm.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 565bfb161c1a..a3fde52840ca 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1575,6 +1575,12 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1575 | 1575 | ||
1576 | neigh = dst_neigh_lookup(ep->dst, | 1576 | neigh = dst_neigh_lookup(ep->dst, |
1577 | &ep->com.cm_id->remote_addr.sin_addr.s_addr); | 1577 | &ep->com.cm_id->remote_addr.sin_addr.s_addr); |
1578 | if (!neigh) { | ||
1579 | pr_err("%s - cannot alloc neigh.\n", __func__); | ||
1580 | err = -ENOMEM; | ||
1581 | goto fail4; | ||
1582 | } | ||
1583 | |||
1578 | /* get a l2t entry */ | 1584 | /* get a l2t entry */ |
1579 | if (neigh->dev->flags & IFF_LOOPBACK) { | 1585 | if (neigh->dev->flags & IFF_LOOPBACK) { |
1580 | PDBG("%s LOOPBACK\n", __func__); | 1586 | PDBG("%s LOOPBACK\n", __func__); |
@@ -3053,6 +3059,12 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb) | |||
3053 | dst = &rt->dst; | 3059 | dst = &rt->dst; |
3054 | neigh = dst_neigh_lookup_skb(dst, skb); | 3060 | neigh = dst_neigh_lookup_skb(dst, skb); |
3055 | 3061 | ||
3062 | if (!neigh) { | ||
3063 | pr_err("%s - failed to allocate neigh!\n", | ||
3064 | __func__); | ||
3065 | goto free_dst; | ||
3066 | } | ||
3067 | |||
3056 | if (neigh->dev->flags & IFF_LOOPBACK) { | 3068 | if (neigh->dev->flags & IFF_LOOPBACK) { |
3057 | pdev = ip_dev_find(&init_net, iph->daddr); | 3069 | pdev = ip_dev_find(&init_net, iph->daddr); |
3058 | e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh, | 3070 | e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh, |