diff options
Diffstat (limited to 'drivers/net/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/mlx4/en_rx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 7e40741fb7d8..7942c4d3cd88 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
@@ -436,8 +436,9 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
436 | /* Initialize page allocators */ | 436 | /* Initialize page allocators */ |
437 | err = mlx4_en_init_allocator(priv, ring); | 437 | err = mlx4_en_init_allocator(priv, ring); |
438 | if (err) { | 438 | if (err) { |
439 | mlx4_err(mdev, "Failed initializing ring allocator\n"); | 439 | mlx4_err(mdev, "Failed initializing ring allocator\n"); |
440 | goto err_allocator; | 440 | ring_ind--; |
441 | goto err_allocator; | ||
441 | } | 442 | } |
442 | 443 | ||
443 | /* Fill Rx buffers */ | 444 | /* Fill Rx buffers */ |
@@ -467,6 +468,7 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
467 | ring->wqres.db.dma, &ring->srq); | 468 | ring->wqres.db.dma, &ring->srq); |
468 | if (err){ | 469 | if (err){ |
469 | mlx4_err(mdev, "Failed to allocate srq\n"); | 470 | mlx4_err(mdev, "Failed to allocate srq\n"); |
471 | ring_ind--; | ||
470 | goto err_srq; | 472 | goto err_srq; |
471 | } | 473 | } |
472 | ring->srq.event = mlx4_en_srq_event; | 474 | ring->srq.event = mlx4_en_srq_event; |
@@ -608,6 +610,10 @@ static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv, | |||
608 | used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags, | 610 | used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags, |
609 | skb_shinfo(skb)->frags, | 611 | skb_shinfo(skb)->frags, |
610 | page_alloc, length); | 612 | page_alloc, length); |
613 | if (unlikely(!used_frags)) { | ||
614 | kfree_skb(skb); | ||
615 | return NULL; | ||
616 | } | ||
611 | skb_shinfo(skb)->nr_frags = used_frags; | 617 | skb_shinfo(skb)->nr_frags = used_frags; |
612 | 618 | ||
613 | /* Copy headers into the skb linear buffer */ | 619 | /* Copy headers into the skb linear buffer */ |
@@ -926,12 +932,6 @@ void mlx4_en_set_default_rss_map(struct mlx4_en_priv *priv, | |||
926 | } | 932 | } |
927 | } | 933 | } |
928 | 934 | ||
929 | static void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event) | ||
930 | { | ||
931 | return; | ||
932 | } | ||
933 | |||
934 | |||
935 | static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, | 935 | static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, |
936 | int qpn, int srqn, int cqn, | 936 | int qpn, int srqn, int cqn, |
937 | enum mlx4_qp_state *state, | 937 | enum mlx4_qp_state *state, |