mfd: fix pcap adc locking

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Saturday, July 4, 2009 - 1:59 pm

Gitweb:     http://git.kernel.org/linus/1c90ea2c7eb3b24a07a2f82164323588fb029bc1
Commit:     1c90ea2c7eb3b24a07a2f82164323588fb029bc1
Parent:     992bb253cd6f08129edcb42b90e6c388ebf605f8
Author:     Daniel Ribeiro <drwyrm@gmail.com>
AuthorDate: Tue Jun 23 12:30:58 2009 -0300
Committer:  Samuel Ortiz <sameol@linux.intel.com>
CommitDate: Fri Jul 3 11:54:57 2009 +0200

    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>
---
 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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mfd: fix pcap adc locking, Linux Kernel Mailing List..., (Sat Jul 4, 1:59 pm)