summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2020-10-01 18:22:41 +0200
committerDavid S. Miller <davem@davemloft.net>2020-10-03 01:30:01 +0200
commit2c580d7783c78c115cea9e50b43477f3eab5076d (patch)
tree0d52dc6beeaf006b7f2f3e5c8866aab6c03710c3 /drivers
parentionic: drain the work queue (diff)
downloadlinux-2c580d7783c78c115cea9e50b43477f3eab5076d.tar.xz
linux-2c580d7783c78c115cea9e50b43477f3eab5076d.zip
ionic: clear linkcheck bit on alloc fail
Clear our link check requested flag on an allocation error. We end up dropping this link check request, but that should be fine as our watchdog will come back a few seconds later and request it again. Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_lif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 53ac0e4402e7..5906145e4585 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -164,8 +164,10 @@ void ionic_link_status_check_request(struct ionic_lif *lif, bool can_sleep)
if (!can_sleep) {
work = kzalloc(sizeof(*work), GFP_ATOMIC);
- if (!work)
+ if (!work) {
+ clear_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state);
return;
+ }
work->type = IONIC_DW_TYPE_LINK_STATUS;
ionic_lif_deferred_enqueue(&lif->deferred, work);