From: tip-bot for Dimitri Sivanich <sivanich@sgi.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
tglx@linutronix.de, sivanich@sgi.com, mingo@elte.hu
Subject: [tip:x86/uv] x86: UV RTC: Clean up error handling
Date: Wed, 14 Oct 2009 16:33:27 GMT [thread overview]
Message-ID: <tip-d5991ff297ad2f7e2698eefcd8269df5ecec150f@git.kernel.org> (raw)
In-Reply-To: <20091014142103.GD11048@sgi.com>
Commit-ID: d5991ff297ad2f7e2698eefcd8269df5ecec150f
Gitweb: http://git.kernel.org/tip/d5991ff297ad2f7e2698eefcd8269df5ecec150f
Author: Dimitri Sivanich <sivanich@sgi.com>
AuthorDate: Wed, 14 Oct 2009 09:21:03 -0500
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 14 Oct 2009 18:27:10 +0200
x86: UV RTC: Clean up error handling
Cleanup error handling in uv_rtc_setup_clock.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20091014142103.GD11048@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/uv_time.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c
index c6324ad..2556450 100644
--- a/arch/x86/kernel/uv_time.c
+++ b/arch/x86/kernel/uv_time.c
@@ -380,15 +380,12 @@ static __init int uv_rtc_setup_clock(void)
if (rc || !uv_rtc_evt_enable)
return rc;
- generic_interrupt_extension = uv_rtc_interrupt;
-
/* Setup and register clockevents */
rc = uv_rtc_allocate_timers();
- if (rc) {
- clocksource_unregister(&clocksource_uv);
- generic_interrupt_extension = NULL;
- return rc;
- }
+ if (rc)
+ goto error;
+
+ generic_interrupt_extension = uv_rtc_interrupt;
clock_event_device_uv.mult = div_sc(sn_rtc_cycles_per_second,
NSEC_PER_SEC, clock_event_device_uv.shift);
@@ -401,11 +398,19 @@ static __init int uv_rtc_setup_clock(void)
rc = schedule_on_each_cpu(uv_rtc_register_clockevents);
if (rc) {
- clocksource_unregister(&clocksource_uv);
generic_interrupt_extension = NULL;
uv_rtc_deallocate_timers();
+ goto error;
}
+ printk(KERN_INFO "UV RTC clockevents registered\n");
+
+ return 0;
+
+error:
+ clocksource_unregister(&clocksource_uv);
+ printk(KERN_INFO "UV RTC clockevents failed rc %d\n", rc);
+
return rc;
}
arch_initcall(uv_rtc_setup_clock);
next prev parent reply other threads:[~2009-10-14 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-09 13:47 [PATCH] x86 UV: Fixes for UV rtc timers Dimitri Sivanich
2009-10-12 16:23 ` Ingo Molnar
2009-10-12 17:52 ` Dimitri Sivanich
2009-10-12 17:59 ` Ingo Molnar
2009-10-14 14:14 ` [PATCH 0/4 v2] X86: UV RTC fixes/cleanup Dimitri Sivanich
2009-10-14 14:16 ` [PATCH 1/4 v2] X86: UV RTC fix early expiry handling Dimitri Sivanich
2009-10-14 14:18 ` [PATCH 2/4 v2] X86: UV RTC add clocksource only boot option Dimitri Sivanich
2009-10-14 14:21 ` [PATCH 3/4 v2] X86: UV RTC cleanup error handling Dimitri Sivanich
2009-10-14 14:22 ` [PATCH 4/4 v2] X86: UV RTC rename generic_interrupt Dimitri Sivanich
2009-10-14 16:33 ` [tip:x86/uv] x86: UV RTC: Rename generic_interrupt to x86_platform_ipi tip-bot for Dimitri Sivanich
2009-10-14 16:33 ` tip-bot for Dimitri Sivanich [this message]
2009-10-14 16:33 ` [tip:x86/uv] x86: UV RTC: Add clocksource only boot option tip-bot for Dimitri Sivanich
2009-10-14 16:32 ` [tip:x86/uv] x86: UV RTC: Fix early expiry handling tip-bot for Dimitri Sivanich
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=tip-d5991ff297ad2f7e2698eefcd8269df5ecec150f@git.kernel.org \
--to=sivanich@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.