From patchwork Wed Jun 2 13:53:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4] rtc: rtc-rs5c372: fixed write buffer size From: thomas.koeller@baslerweb.com X-Patchwork-Id: 54373 Message-Id: <1275486787-30406-2-git-send-email-thomas.koeller@baslerweb.com> To: p_gortmaker@yahoo.com, rtc-linux@googlegroups.com Cc: Thomas Koeller Date: Wed, 2 Jun 2010 15:53:04 +0200 From: Thomas Koeller When setting a new time value, the oscillator adjustment register was overwritten with the contents of an uninitialized memory byte. Signed-off-by: Thomas Koeller Acked-by: Wan ZongShun --- drivers/rtc/rtc-rs5c372.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 2f2c68d..211cacd 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -206,7 +206,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm) static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) { struct rs5c372 *rs5c = i2c_get_clientdata(client); - unsigned char buf[8]; + unsigned char buf[7]; int addr; dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "