[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <165642477283.31669.14698542396209546371.stgit@palantir17.mph.net>
Date: Tue, 28 Jun 2022 14:59:32 +0100
From: Martin Habets <habetsm.xilinx@...il.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, jonathan.s.cooper@....com
Cc: netdev@...r.kernel.org, ecree.xilinx@...il.com
Subject: [PATCH net-next v2 04/10] sfc: Change BUG_ON to WARN_ON and recovery
code.
From: Jonathan Cooper <jonathan.s.cooper@....com>
Pre-emptively fix a checkpatch warning in a subsequent patch.
Signed-off-by: Jonathan Cooper <jonathan.s.cooper@....com>
Co-developed-by: Martin Habets <habetsm.xilinx@...il.com>
Signed-off-by: Martin Habets <habetsm.xilinx@...il.com>
---
drivers/net/ethernet/sfc/efx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 955271ff06bb..dead69025bf5 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -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));
Powered by blists - more mailing lists