mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[ARM] fix drivers/mfd/ucb1x00-core.c IRQ probing bug
While reviewing the IRQ autoprobing code i found the attached buglet. probe_irq_on()/off() calls must always be in pairs, because the generic IRQ code uses a global semaphore to serialize all autoprobing activites. (which does make sense) The ARM code's probe_irq_*() implementation does not do this, but if this driver is ever used on another platform, this bug might bite. (It probably does not trigger in practice, because a zero probing mask returned should be rare - but still.) Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
cd701aa27e
commit
cfc736564f
1 changed files with 3 additions and 1 deletions
|
|
@ -420,8 +420,10 @@ static int ucb1x00_detect_irq(struct ucb1x00 *ucb)
|
|||
unsigned long mask;
|
||||
|
||||
mask = probe_irq_on();
|
||||
if (!mask)
|
||||
if (!mask) {
|
||||
probe_irq_off(mask);
|
||||
return NO_IRQ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the ADC interrupt.
|
||||
|
|
|
|||
Loading…
Reference in a new issue