sfc: Change BUG_ON to WARN_ON and recovery code.
Pre-emptively fix a checkpatch warning in a subsequent patch. Signed-off-by: Jonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
62ac3ce542
commit
b3fd0a86da
@ -774,7 +774,8 @@ static void efx_unregister_netdev(struct efx_nic *efx)
|
||||
if (!efx->net_dev)
|
||||
return;
|
||||
|
||||
BUG_ON(netdev_priv(efx->net_dev) != efx);
|
||||
if (WARN_ON(netdev_priv(efx->net_dev) != efx))
|
||||
return;
|
||||
|
||||
if (efx_dev_registered(efx)) {
|
||||
strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name));
|
||||
|
Loading…
x
Reference in New Issue
Block a user