lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/4] MFD/PCAP: fix adc locking
From
Date
Release the lock on error.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>

---
drivers/mfd/ezx-pcap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 671a7ef..c1de4af 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);
--
tg: (f234012..) pcap/fix-adc-locking (depends on: master)
--
Daniel Ribeiro
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-06-23 17:39    [W:0.035 / U:1.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site