From e4968e9a523a3c08eae74534da1d18708dfebb25 Mon Sep 17 00:00:00 2001 From: Madhusudhan Chikkature Date: Tue, 22 Jul 2008 17:33:58 +0530 Subject: [PATCH] Free HDQ clocks in error path ARM: OMAP3: Free HDQ clocks when a read is tried with no battery connected Signed-off-by: Madhusudhan Chikkature Signed-off-by: Tony Lindgren --- drivers/w1/masters/omap_hdq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 595fd8d48fd..8cb6aa38d64 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -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) { -- 2.41.1