mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-08 15:45:14 +00:00
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>
This commit is contained in:
parent
c8650fd03d
commit
da4eb27a2c
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ static int ntb_netdev_open(struct net_device *ndev)
|
||||||
|
|
||||||
rc = ntb_transport_rx_enqueue(dev->qp, skb, skb->data,
|
rc = ntb_transport_rx_enqueue(dev->qp, skb, skb->data,
|
||||||
ndev->mtu + ETH_HLEN);
|
ndev->mtu + ETH_HLEN);
|
||||||
if (rc == -EINVAL) {
|
if (rc) {
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue