Remove and restore the lif's debugfs pointers on a reset,
and make sure to check for the dentry before removing it
in case an earlier reset failed to rebuild the lif.
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        ionic_txrx_free(lif);
        ionic_lif_deinit(lif);
        ionic_qcqs_free(lif);
+       ionic_debugfs_del_lif(lif);
        mutex_unlock(&lif->queue_lock);
 
        ionic_dev_teardown(ionic);
 
 
 void ionic_debugfs_del_lif(struct ionic_lif *lif)
 {
+       if (!lif->dentry)
+               return;
+
        debugfs_remove_recursive(lif->dentry);
        lif->dentry = NULL;
 }