summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorDaniel Ribeiro <drwyrm@gmail.com>2009-06-23 12:30:58 -0300
committerSamuel Ortiz <sameol@linux.intel.com>2009-07-03 11:54:57 +0200
commit1c90ea2c7eb3b24a07a2f82164323588fb029bc1 (patch)
tree0dea0df7b9e6833c0e1e057a5085404ead6401aa /drivers/mfd
parent992bb253cd6f08129edcb42b90e6c388ebf605f8 (diff)
downloadblackbird-op-linux-1c90ea2c7eb3b24a07a2f82164323588fb029bc1.tar.gz
blackbird-op-linux-1c90ea2c7eb3b24a07a2f82164323588fb029bc1.zip
mfd: fix pcap adc locking
Release the lock on error. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ezx-pcap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 671a7efe86a8..c1de4afa89a6 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -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);
OpenPOWER on IntegriCloud