Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jonathan Cooper and committed by
David S. Miller
b3fd0a86 62ac3ce5

+2 -1
+2 -1
drivers/net/ethernet/sfc/efx.c
··· 774 774 if (!efx->net_dev) 775 775 return; 776 776 777 - BUG_ON(netdev_priv(efx->net_dev) != efx); 777 + if (WARN_ON(netdev_priv(efx->net_dev) != efx)) 778 + return; 778 779 779 780 if (efx_dev_registered(efx)) { 780 781 strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name));