cd9d16
From 1c363aca36c5f53cb04d04fa1ee9a442dd5dbad4 Mon Sep 17 00:00:00 2001
cd9d16
From: Stefan Weil <sw@weilnetz.de>
cd9d16
Date: Sat, 25 Feb 2012 14:50:25 +0100
cd9d16
Subject: [PATCH] ds1338: Add missing break statement
cd9d16
MIME-Version: 1.0
cd9d16
Content-Type: text/plain; charset=UTF-8
cd9d16
Content-Transfer-Encoding: 8bit
cd9d16
cd9d16
Without the break statement, case 5 sets month and year from the same
cd9d16
data. This does not look correct.
cd9d16
cd9d16
The missing break was reported by splint.
cd9d16
cd9d16
Signed-off-by: Stefan Weil <sw@weilnetz.de>
cd9d16
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
cd9d16
Reviewed-by: Andreas Färber <afaerber@suse.de>
cd9d16
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cd9d16
(cherry picked from commit fbac6a7d35d119a52606c175aface9bcec805f09)
cd9d16
cd9d16
Signed-off-by: Andreas Färber <afaerber@suse.de>
cd9d16
---
cd9d16
 hw/ds1338.c | 1 +
cd9d16
 1 file changed, 1 insertion(+)
cd9d16
cd9d16
diff --git a/hw/ds1338.c b/hw/ds1338.c
cd9d16
index 3522af5..964d2f7 100644
cd9d16
--- a/hw/ds1338.c
cd9d16
+++ b/hw/ds1338.c
cd9d16
@@ -97,6 +97,7 @@ static int ds1338_send(i2c_slave *i2c, uint8_t data)
cd9d16
             break;
cd9d16
         case 5:
cd9d16
             s->now.tm_mon = from_bcd(data & 0x1f) - 1;
cd9d16
+            break;
cd9d16
         case 6:
cd9d16
             s->now.tm_year = from_bcd(data) + 100;
cd9d16
             break;
cd9d16
-- 
cd9d16
1.7.11.2
cd9d16