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>
This commit is contained in:
parent
c253573f3e
commit
5e9445da28
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user