From: Daniel Lezcano Date: Tue, 19 Apr 2016 13:43:02 +0000 (+0200) Subject: clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test X-Git-Tag: v4.5.4~88 X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ff5fc8661040f37a67a4a95c231f6765d6f59c;p=linux clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test commit 16eeed7e5558a3dcf30f75526a896b2632f299f9 upstream. Commit 0881841f7e78 introduced a regression by inverting a test check after calling clocksource_mmio_init(). That results on the system to hang at boot time. Fix it by inverting the test again. Fixes: 0881841f7e78 ("Replace code by clocksource_mmio_init") Reported-by: Marc Gonzalez Signed-off-by: Daniel Lezcano Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/clocksource/tango_xtal.c b/drivers/clocksource/tango_xtal.c index 2bcecafdeaea..c407c47a3232 100644 --- a/drivers/clocksource/tango_xtal.c +++ b/drivers/clocksource/tango_xtal.c @@ -42,7 +42,7 @@ static void __init tango_clocksource_init(struct device_node *np) ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350, 32, clocksource_mmio_readl_up); - if (!ret) { + if (ret) { pr_err("%s: registration failed\n", np->full_name); return; }