From patchwork Thu Dec 2 13:47:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 73972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wy0-f184.google.com (mail-wy0-f184.google.com [74.125.82.184]) by ozlabs.org (Postfix) with ESMTP id 39B5FB708B for ; Fri, 3 Dec 2010 00:47:40 +1100 (EST) Received: by wyb39 with SMTP id 39sf6219990wyb.11 for ; Thu, 02 Dec 2010 05:47:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references :x-sa-exim-connect-ip:x-sa-exim-mail-from:x-sa-exim-scanned :x-ptx-original-recipient:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=BXaYGZU0/O0THZRYDDvmP1iUsfLQqPMYCvBkNxevihk=; b=gRJF4u5/TH8L7CjQNBTrPLfkaGrFeZtghgkmLtd9qO0ygK9LyQI7aZnaAno2s23Pxu 2y5sxTRn5d+9E8uPEVKJxelH1ch5bvAQdFI/QJU9TDRZndBhf+XWZdkcRoc0ps0GIPig Qvscid0VsJotuTwDnPd3jh2E3xydyGdQnWfSs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:x-sa-exim-connect-ip :x-sa-exim-mail-from:x-sa-exim-scanned:x-ptx-original-recipient :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; b=YBE4B9hbCcHHeIO7oRYHFJPLGiP4f+pebwelPFde+B2sogJZKZU55uAVBop/siApdJ OyBc5F94gQHCmG7VWTkF+g3vuAl4elofbMGFlIEhtjdwd0keGtDEeUF0Q2u0HtplV5DR bBTphsMXIp9UiMhtJ3O9dMJk0CMWFP+qo6d4w= Received: by 10.216.10.65 with SMTP id 43mr645066weu.22.1291297656932; Thu, 02 Dec 2010 05:47:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.14.26.28 with SMTP id b28ls1112535eea.5.p; Thu, 02 Dec 2010 05:47:36 -0800 (PST) Received: by 10.14.119.1 with SMTP id m1mr33792eeh.12.1291297656157; Thu, 02 Dec 2010 05:47:36 -0800 (PST) Received: by 10.14.119.1 with SMTP id m1mr33791eeh.12.1291297656129; Thu, 02 Dec 2010 05:47:36 -0800 (PST) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gmr-mx.google.com with ESMTP id z15si179202eeh.2.2010.12.02.05.47.35; Thu, 02 Dec 2010 05:47:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of w.sang@pengutronix.de designates 92.198.50.35 as permitted sender) client-ip=92.198.50.35; Received: from katana.hi.pengutronix.de ([2001:6f8:1178:2:221:70ff:fe71:1890] helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1PO9VX-0006Ar-M7; Thu, 02 Dec 2010 14:47:35 +0100 From: Wolfram Sang To: rtc-linux@googlegroups.com Cc: Andre van Rooyen , Peter Korsgaard , Wolfram Sang , Alessandro Zummo , Andrew Morton , stable@kernel.org Subject: [rtc-linux] [PATCH] rtc: rs5c372: fix buffer-size Date: Thu, 2 Dec 2010 14:47:17 +0100 Message-Id: <1291297637-23432-1-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <20101202103803.GD3345@pengutronix.de> References: <20101202103803.GD3345@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:221:70ff:fe71:1890 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: rtc-linux@googlegroups.com X-Original-Sender: w.sang@pengutronix.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of w.sang@pengutronix.de designates 92.198.50.35 as permitted sender) smtp.mail=w.sang@pengutronix.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Match the buffer-size to the amount of initialized values. Before, it was one too big and thus destroyed the neighbouring register causing the clock to run at false speeds. Reported-by: Andre van Rooyen Signed-off-by: Wolfram Sang Cc: Alessandro Zummo Cc: Andrew Morton Cc: stable@kernel.org --- Andre said he was OK with being the reporter and not needing to keep track of this bug. 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 90cf0a6..dd14e20 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -207,7 +207,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 "