Skip to content

Commit

Permalink
ipmi: Stop the timer immediately if idle
Browse files Browse the repository at this point in the history
The IPMI driver would let the final timeout just happen, but it could
easily just stop the timer.  If the timer stop fails that's ok, that
should be rare.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
cminyard committed Nov 16, 2015
1 parent 0cfec91 commit 314ef52
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,13 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
}
goto restart;
}

if (si_sm_result == SI_SM_IDLE && smi_info->timer_running) {
/* Ok it if fails, the timer will just go off. */
if (del_timer(&smi_info->si_timer))
smi_info->timer_running = false;
}

out:
return si_sm_result;
}
Expand Down

0 comments on commit 314ef52

Please sign in to comment.