提交 b3fd0a86 编写于 作者: J Jonathan Cooper 提交者: David S. Miller

sfc: Change BUG_ON to WARN_ON and recovery code.

Pre-emptively fix a checkpatch warning in a subsequent patch.
Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com>
Co-developed-by: NMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 62ac3ce5
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册