From patchwork Thu May 27 21:28:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maurus Cuelenaere X-Patchwork-Id: 53815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pv0-f184.google.com (mail-pv0-f184.google.com [74.125.83.184]) by ozlabs.org (Postfix) with ESMTP id F15CFB7D1C for ; Fri, 28 May 2010 07:28:54 +1000 (EST) Received: by pva18 with SMTP id 18sf104580pva.11 for ; Thu, 27 May 2010 14:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:received:received:message-id:date :from:user-agent:mime-version:to:cc:subject:references:in-reply-to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=3AgPu8brcrBcFSOKksPzDMdgt4fw3oZgaqRlafO8Ljg=; b=UbXSnPJJ12oHuVPvWiax/KJCyLQdGRUjH8c1b8SlVXXP7WRTmmNHTzIVtAX0z+e0Av gu6cwnOP2KTIoJyv3N1uRnje4J4JOpMcC7tJ/Gp1p4/lmVUm0hviN20v0bHSxCtyCUU6 g+CoXCV2NIPMoR72Sqnmc4iqN7G2OQRpeaf9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; b=6W/WBebf+pnW3ypAq0PTHAtjiYyepjVE4ShGUTeJ+WhpGFiYX0bfUvWRbmxHyqJOxP Bf6FA6EjcttZnr4ySASewRpcRVn7UxdVQIvDQ2UW6sg4SNb7H3ab6skLKpH6Rhp0ea1u KYU80fgn4VNJFKj0hl206AJG3PmUMa752IcmI= Received: by 10.141.187.38 with SMTP id o38mr934502rvp.24.1274995733325; Thu, 27 May 2010 14:28:53 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.141.213.18 with SMTP id p18ls1195648rvq.1.p; Thu, 27 May 2010 14:28:51 -0700 (PDT) Received: by 10.141.213.1 with SMTP id p1mr3755377rvq.22.1274995731808; Thu, 27 May 2010 14:28:51 -0700 (PDT) Received: by 10.141.213.1 with SMTP id p1mr3755376rvq.22.1274995731785; Thu, 27 May 2010 14:28:51 -0700 (PDT) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by gmr-mx.google.com with ESMTP id 19si270972pzk.11.2010.05.27.14.28.50; Thu, 27 May 2010 14:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of mcuelenaere@gmail.com designates 74.125.78.27 as permitted sender) client-ip=74.125.78.27; Received: by ey-out-2122.google.com with SMTP id d26so26807eyd.33 for ; Thu, 27 May 2010 14:28:49 -0700 (PDT) Received: by 10.213.14.20 with SMTP id e20mr337937eba.27.1274995729535; Thu, 27 May 2010 14:28:49 -0700 (PDT) Received: from [192.168.1.105] (d54C4B918.access.telenet.be [84.196.185.24]) by mx.google.com with ESMTPS id 13sm855000ewy.5.2010.05.27.14.28.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 May 2010 14:28:48 -0700 (PDT) Message-ID: <4BFEE40F.8010400@gmail.com> Date: Thu, 27 May 2010 23:28:47 +0200 From: Maurus Cuelenaere User-Agent: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: rtc-linux@googlegroups.com, linux-samsung-soc@vger.kernel.org CC: ben-linux@fluff.org, a.zummo@towertech.it, p_gortmaker@yahoo.com, Jiri.Pinkava@vscht.cz, akpm@linux-foundation.org Subject: [rtc-linux] [PATCH 2/2] RTC: s3c: Initialize s3c_rtc_cpu_type before using it References: In-Reply-To: X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mcuelenaere@gmail.com designates 74.125.78.27 as permitted sender) smtp.mail=mcuelenaere@gmail.com; dkim=pass (test mode) header.i=@gmail.com X-Original-Sender: mcuelenaere@gmail.com 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: , Make sure s3c_rtc_cpu_type is initialised _before_ it's used in an if() check. This was probably caused due to a merge mistake. Reported-by: Jiri Pinkava Signed-off-by: Maurus Cuelenaere --- drivers/rtc/rtc-s3c.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 6adebf3..70b68d3 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -508,13 +508,13 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev) goto err_nortc; } + s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data; + if (s3c_rtc_cpu_type == TYPE_S3C64XX) rtc->max_user_freq = 32768; else rtc->max_user_freq = 128; - s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data; - platform_set_drvdata(pdev, rtc); s3c_rtc_setfreq(&pdev->dev, 1);