Skip to content
Browse files

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 <>
Signed-off-by: Kushwaha Prabhakar <>
  • Loading branch information...
ashishnxp authored and prabhukush committed Oct 26, 2017
1 parent 0ca9091 commit 44a294ba8adce5d5a89ce8c08de4fdbdd6b5e73a
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 44a294b

Please sign in to comment.
You can’t perform that action at this time.