staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro

Make use of 'ENOBUFS' instead of WILC_TX_ERR_NO_BUF macro. The value of
WILC_TX_ERR_NO_BUF is -2, which is confusing with ENOENT error code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ajay Singh 2018-11-12 05:45:32 +00:00 committed by Greg Kroah-Hartman
parent d0e41eff4c
commit 68b4f745cf
3 changed files with 2 additions and 4 deletions

View File

@ -242,7 +242,7 @@ static int linux_wlan_txq_task(void *vp)
if (netif_queue_stopped(wl->vif[1]->ndev))
netif_wake_queue(wl->vif[1]->ndev);
}
} while (ret == WILC_TX_ERR_NO_BUF && !wl->close);
} while (ret == -ENOBUFS && !wl->close);
}
return 0;
}

View File

@ -611,7 +611,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
goto out_release_bus;
if (entries == 0) {
ret = WILC_TX_ERR_NO_BUF;
ret = -ENOBUFS;
goto out_release_bus;
}

View File

@ -41,8 +41,6 @@ struct tx_complete_data {
typedef void (*wilc_tx_complete_func_t)(void *, int);
#define WILC_TX_ERR_NO_BUF (-2)
/********************************************
*
* Wlan Configuration ID