Commit f3d302d9 authored by Samuel Thibault's avatar Samuel Thibault Committed by Linus Torvalds

[PATCH] speedstep_detect_speed might not reenable interrupts

local_irq_save() is called at the beginning of speedstep_detect_speeds,
but local_irq_restore() is not called on I/O errors.
parent 7afd3b34
...@@ -549,8 +549,10 @@ static int speedstep_detect_speeds (void) ...@@ -549,8 +549,10 @@ static int speedstep_detect_speeds (void)
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
/* read the current state */ /* read the current state */
result = speedstep_get_state(&state); result = speedstep_get_state(&state);
if (result) if (result) {
local_irq_restore(flags);
return result; return result;
}
/* save the correct value, and switch to other */ /* save the correct value, and switch to other */
if (state == SPEEDSTEP_LOW) { if (state == SPEEDSTEP_LOW) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment