diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index a4e59239f28e0bae3bf3207a3c69c34b4fa25e37..20ec066481fe2bcddd05518c851b6c43bdc5f2b8 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -342,7 +342,7 @@ static int __init armada_370_xp_timer_common_init(struct device_node *np)
 	}
 
 	res = armada_370_xp_timer_setup(this_cpu_ptr(armada_370_xp_evt));
-	if (!res) {
+	if (res) {
 		pr_err("Failed to setup timer");
 		return res;
 	}