From fc0a75298ff8519997885914c4365467748a406a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 4 May 2011 08:18:34 +0200 Subject: [PATCH] --- yaml --- r: 248633 b: refs/heads/master c: 179eb03268aa1da03d90f1566ea85dc1478d3ae3 h: refs/heads/master i: 248631: e088062e59abbcdee5a65fa93c6f1e9582087361 v: v3 --- [refs] | 2 +- trunk/kernel/time/alarmtimer.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index bd09a63034ac..f46547a4a2e3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce788f930b0cdf821de7ee8f84cfe8cf7fcb6311 +refs/heads/master: 179eb03268aa1da03d90f1566ea85dc1478d3ae3 diff --git a/trunk/kernel/time/alarmtimer.c b/trunk/kernel/time/alarmtimer.c index e5db9b00751b..c6027fe9a4e6 100644 --- a/trunk/kernel/time/alarmtimer.c +++ b/trunk/kernel/time/alarmtimer.c @@ -675,8 +675,14 @@ static int __init alarmtimer_init_late(void) /* Find an rtc device and init the rtc_timer */ dev = class_find_device(rtc_class, NULL, &str, has_wakealarm); /* If we have a device then str is valid. See has_wakealarm() */ - if (dev) + if (dev) { rtcdev = rtc_class_open(str); + /* + * Drop the reference we got in class_find_device, + * rtc_open takes its own. + */ + put_device(dev); + } if (!rtcdev) { printk(KERN_WARNING "No RTC device found, ALARM timers will" " not wake from suspend");