Skip to content

Commit

Permalink
NTB: ntb_netdev not covering all receive errors
Browse files Browse the repository at this point in the history
ntb_netdev is allowing the link to come up even when -ENOMEM is returned
from ntb_transport_rx_enqueue.  Fix to cover all possible errors.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Dave Jiang authored and Jon Mason committed Aug 9, 2015
1 parent c8650fd commit da4eb27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ntb_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int ntb_netdev_open(struct net_device *ndev)

rc = ntb_transport_rx_enqueue(dev->qp, skb, skb->data,
ndev->mtu + ETH_HLEN);
if (rc == -EINVAL) {
if (rc) {
dev_kfree_skb(skb);
goto err;
}
Expand Down

0 comments on commit da4eb27

Please sign in to comment.