aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2014-01-23 18:55:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 19:37:00 -0500
commit24b34472e2e6e3815f36e39d6996e3b39ebb2a5e (patch)
treee2510c7b33694545f34bf47b5bcaacbf510408e9 /drivers/rtc/rtc-cmos.c
parent9d2b7e532da8aadfcc1bd85b62ec5dd853e870e3 (diff)
drivers/rtc/rtc-cmos.c: propagate hpet_register_irq_handler() failure
If hpet_register_irq_handler() fails, cmos_do_probe() will incorrectly return 0. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Cc: John Stultz <john.stultz@linaro.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index f28b45856d66..cae212f30d65 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -756,11 +756,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
756 irq_handler_t rtc_cmos_int_handler; 756 irq_handler_t rtc_cmos_int_handler;
757 757
758 if (is_hpet_enabled()) { 758 if (is_hpet_enabled()) {
759 int err;
760
761 rtc_cmos_int_handler = hpet_rtc_interrupt; 759 rtc_cmos_int_handler = hpet_rtc_interrupt;
762 err = hpet_register_irq_handler(cmos_interrupt); 760 retval = hpet_register_irq_handler(cmos_interrupt);
763 if (err != 0) { 761 if (retval) {
764 dev_warn(dev, "hpet_register_irq_handler " 762 dev_warn(dev, "hpet_register_irq_handler "
765 " failed in rtc_init()."); 763 " failed in rtc_init().");
766 goto cleanup1; 764 goto cleanup1;