public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Wolfram Sang <w.sang@pengutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com
Subject: Re: [PATCH] rtc: ep93xx: Fix 'rtc' may be used uninitialized warning
Date: Wed, 10 Aug 2011 15:33:15 -0700	[thread overview]
Message-ID: <1313015595.15198.86.camel@work-vm> (raw)
In-Reply-To: <1312981886.21916.2.camel@phoenix>

On Wed, 2011-08-10 at 21:11 +0800, Axel Lin wrote:
> commit 92d921c5d "rtc: ep93xx: Initialize drvdata before registering device"
> ensures the drvdata is initialized prior to registering the rtc device.
> But it set the drvdata to an uninitialized pointer.
> Thus calling platform_get_drvdata in ep93xx_rtc_remove does not get correct address.
> 
> This patch fixes below warning by adding struct rtc_device *rtc to struct ep93xx_rtc.
> Then set platform drvdata to ep93xx_rtc instead of rtc.
> 
>   CC      drivers/rtc/rtc-ep93xx.o
> drivers/rtc/rtc-ep93xx.c: In function 'ep93xx_rtc_probe':
> drivers/rtc/rtc-ep93xx.c:154: warning: 'rtc' may be used uninitialized in this function
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>


Thanks! I went ahead and queued this.

-john



      reply	other threads:[~2011-08-10 22:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 13:11 [PATCH] rtc: ep93xx: Fix 'rtc' may be used uninitialized warning Axel Lin
2011-08-10 22:33 ` John Stultz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313015595.15198.86.camel@work-vm \
    --to=john.stultz@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox