ionic: deinit rss only if selected
authorShannon Nelson <snelson@pensando.io>
Tue, 17 Mar 2020 03:22:07 +0000 (20:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 04:18:25 +0000 (21:18 -0700)
Don't bother de-initing RSS if it wasn't selected.

Fixes: aa3198819bea ("ionic: Add RSS support")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index b903016193df19323b6946ac7599116c0f30360d..19fd7cc36f2808abcb1485d491874ab745b21f95 100644 (file)
@@ -2066,7 +2066,8 @@ static void ionic_lif_deinit(struct ionic_lif *lif)
        clear_bit(IONIC_LIF_F_INITED, lif->state);
 
        ionic_rx_filters_deinit(lif);
-       ionic_lif_rss_deinit(lif);
+       if (lif->netdev->features & NETIF_F_RXHASH)
+               ionic_lif_rss_deinit(lif);
 
        napi_disable(&lif->adminqcq->napi);
        ionic_lif_qcq_deinit(lif, lif->notifyqcq);