Skip to contentSkip to conversation

rtc-coh901331: Fix braces in resume code.

PATCH In review James Hogan 3 participants 3 messages Mar 3, 2010 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc-coh901331: Fix braces in resume code.

The else part of the if statement is indented but does not have braces around it. It clearly should since it uses clk_enable and clk_disable which are supposed to balance.

---
 drivers/rtc/rtc-coh901331.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/rtc/rtc-coh901331.c +3 -2
index 03ea530..44c4399 100644
@@ -271,12 +271,13 @@ static int coh901331_resume(struct platform_device *pdev)
 {
 	struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(&pdev->dev))
+	if (device_may_wakeup(&pdev->dev)) {
 		disable_irq_wake(rtap->irq);
-	else
+	} else {
 		clk_enable(rtap->clk);
 		writel(rtap->irqmaskstore, rtap->virtbase + COH901331_IRQ_MASK);
 		clk_disable(rtap->clk);
+	}
 	return 0;
 }
 #else
Signature · 1 line
1.5.5.6
Acked-by on v1 1/1
#2 lore raw
In reply to James Hogan
Quoted 5 lines · On Wed, 3 Mar 2010 11:55:15 +0000 James Hogan <[email protected]> wrote:

The else part of the if statement is indented but does not have braces around it. It clearly should since it uses clk_enable and clk_disable which are supposed to balance.

Signature · 6 lines
 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it