]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Free HDQ clocks in error path
authorMadhusudhan Chikkature <madhu.cr@ti.com>
Tue, 22 Jul 2008 12:03:58 +0000 (17:33 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 5 Aug 2008 13:29:48 +0000 (16:29 +0300)
ARM: OMAP3: Free HDQ clocks when a read is tried with no battery connected

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/w1/masters/omap_hdq.c

index 595fd8d48fd1a341807b556300f3befa9592dcc2..8cb6aa38d647880785de77afedda58fb2df80d55 100644 (file)
@@ -515,8 +515,11 @@ static u8 omap_w1_read_byte(void *data)
        int ret;
 
        ret = hdq_read_byte(&val);
-       if (ret)
+       if (ret) {
+               init_trans = 0;
+               omap_hdq_put();
                return -1;
+       }
 
        /* Write followed by a read, release the module */
        if (init_trans) {