diff options
author | Ashish Kumar <Ashish.Kumar@nxp.com> | 2017-10-26 10:33:22 (GMT) |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-11-14 16:33:20 (GMT) |
commit | 5e9445da288c5121546235e8201768abd087b281 (patch) | |
tree | 996a19d422a30ac28ef7d0c3c8f986628662b31c | |
parent | c253573f3e269fd9a24ee6684d87dd91106018a5 (diff) | |
download | u-boot-5e9445da288c5121546235e8201768abd087b281.tar.xz |
drivers: net: ldpaa_eth: Correct error handler for qbman_swp_acquire()
The zero value returned from qbman_swp_acquire() is an error
condition meaning no free buffer for allocation.
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kushwaha Prabhakar <prabhakar@freescale.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
-rw-r--r-- | drivers/net/ldpaa_eth/ldpaa_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index f235b62..21be79a 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -334,7 +334,7 @@ static int ldpaa_eth_tx(struct eth_device *net_dev, void *buf, int len) &buffer_start, 1); } while (err == -EBUSY); - if (err < 0) { + if (err <= 0) { printf("qbman_swp_acquire() failed\n"); return -ENOMEM; } |