diff mbox

rtc: ep93xx: Fix compiler warning in ep93xx_rtc_probe

Message ID 1307794045-27845-1-git-send-email-ynezz@true.cz
State Superseded
Headers show

Commit Message

Petr Štetiar June 11, 2011, 12:07 p.m. UTC
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(-)
diff mbox

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);