Skip to content

Commit

Permalink
mfd: fix pcap adc locking
Browse files Browse the repository at this point in the history
Release the lock on error.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Daniel Ribeiro authored and Samuel Ortiz committed Jul 3, 2009
1 parent 992bb25 commit 1c90ea2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mfd/ezx-pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)
mutex_lock(&pcap->adc_mutex);
req = pcap->adc_queue[pcap->adc_head];

if (WARN(!req, KERN_WARNING "adc irq without pending request\n"))
if (WARN(!req, KERN_WARNING "adc irq without pending request\n")) {
mutex_unlock(&pcap->adc_mutex);
return IRQ_HANDLED;
}

/* read requested channels results */
ezx_pcap_read(pcap, PCAP_REG_ADC, &tmp);
Expand Down

0 comments on commit 1c90ea2

Please sign in to comment.