summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx_channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/efx_channels.c')
-rw-r--r--drivers/net/ethernet/sfc/efx_channels.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 21bd71daf5a0..aeb5e8aa2f2a 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -1039,7 +1039,7 @@ void efx_stop_channels(struct efx_nic *efx)
struct efx_tx_queue *tx_queue;
struct efx_rx_queue *rx_queue;
struct efx_channel *channel;
- int rc;
+ int rc = 0;
/* Stop RX refill */
efx_for_each_channel(channel, efx) {
@@ -1060,7 +1060,9 @@ void efx_stop_channels(struct efx_nic *efx)
}
}
- rc = efx->type->fini_dmaq(efx);
+ if (efx->type->fini_dmaq)
+ rc = efx->type->fini_dmaq(efx);
+
if (rc) {
netif_err(efx, drv, efx->net_dev, "failed to flush queues\n");
} else {