aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ntb_netdev.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2015-07-13 08:07:10 -0400
committerJon Mason <jdmason@kudzu.us>2015-08-09 16:32:21 -0400
commitda4eb27a2c2efd034bdd645650114b82c479329c (patch)
tree17c3763dfb3492ca2812383b52c1f193a7544fd6 /drivers/net/ntb_netdev.c
parentNTB: Fix transport stats for multiple devices (diff)
downloadlinux-dev-da4eb27a2c2efd034bdd645650114b82c479329c.tar.xz
linux-dev-da4eb27a2c2efd034bdd645650114b82c479329c.zip
NTB: ntb_netdev not covering all receive errors
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>
Diffstat (limited to 'drivers/net/ntb_netdev.c')
-rw-r--r--drivers/net/ntb_netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index 5f1ee7c05f68..d8757bf9ad75 100644
--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -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;
}