mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue