Patchwork rtc: ep93xx: Fix compiler warning in ep93xx_rtc_probe

login
register
mail settings
Submitter Petr Štetiar
Date June 11, 2011, 12:07 p.m.
Message ID <1307794045-27845-1-git-send-email-ynezz@true.cz>
Download mbox | patch
Permalink /patch/100008/
State New
Headers show

Comments

Petr Štetiar - June 11, 2011, 12:07 p.m.
Commit 92d921c5def introduced following compiler warning:

drivers/rtc/rtc-ep93xx.c: In function 'ep93xx_rtc_probe':
include/linux/platform_device.h:145:17: warning: 'rtc' may be used uninitialized in this function
drivers/rtc/rtc-ep93xx.c:133:21: note: 'rtc' was declared here

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 drivers/rtc/rtc-ep93xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 335551d..50bd69f 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -130,7 +130,7 @@  static int __init ep93xx_rtc_probe(struct platform_device *pdev)
 {
 	struct ep93xx_rtc *ep93xx_rtc;
 	struct resource *res;
-	struct rtc_device *rtc;
+	struct rtc_device *rtc = NULL;
 	int err;
 
 	ep93xx_rtc = devm_kzalloc(&pdev->dev, sizeof(*ep93xx_rtc), GFP_KERNEL);