From fe231b07736bc37db392a98f33e2ae01e901b3df Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 4 May 2011 08:00:47 +0200 Subject: [PATCH] --- yaml --- r: 248632 b: refs/heads/master c: ce788f930b0cdf821de7ee8f84cfe8cf7fcb6311 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/time/alarmtimer.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fab9ffab6080..bd09a63034ac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 99ee5315dac6211e972fa3f23bcc9a0343ff58c4 +refs/heads/master: ce788f930b0cdf821de7ee8f84cfe8cf7fcb6311 diff --git a/trunk/kernel/time/alarmtimer.c b/trunk/kernel/time/alarmtimer.c index 9265014cb4db..e5db9b00751b 100644 --- a/trunk/kernel/time/alarmtimer.c +++ b/trunk/kernel/time/alarmtimer.c @@ -669,11 +669,13 @@ static int __init has_wakealarm(struct device *dev, void *name_ptr) */ static int __init alarmtimer_init_late(void) { + struct device *dev; char *str; /* Find an rtc device and init the rtc_timer */ - class_find_device(rtc_class, NULL, &str, has_wakealarm); - if (str) + dev = class_find_device(rtc_class, NULL, &str, has_wakealarm); + /* If we have a device then str is valid. See has_wakealarm() */ + if (dev) rtcdev = rtc_class_open(str); if (!rtcdev) { printk(KERN_WARNING "No RTC device found, ALARM timers will"