diff options
author | Ashish Kumar <Ashish.Kumar@nxp.com> | 2017-10-26 06:33:53 (GMT) |
---|---|---|
committer | Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> | 2017-10-30 03:12:22 (GMT) |
commit | 44a294ba8adce5d5a89ce8c08de4fdbdd6b5e73a (patch) | |
tree | 7a81295ee10799b84309be1107485ca9a0c30bd4 | |
parent | 0ca9091106ab16f8a8df624d6ae42146eedf3872 (diff) | |
download | u-boot-44a294ba8adce5d5a89ce8c08de4fdbdd6b5e73a.tar.xz |
drivers: net: ldpaa_eth: Correct error handler for qbman_swp_acquire()
Correcting error handing for qbman_swp_acquire. The return value is zero is
an error condition since number of buffer copied is zero meaning
there are no free buffers for allocation.
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kushwaha Prabhakar <prabhakar@freescale.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; } |