clocksource/drivers/cadence_ttc: fix a return value in case of error
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Wed, 6 Jul 2016 05:35:23 +0000 (07:35 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 7 Jul 2016 07:44:38 +0000 (09:44 +0200)
IS_ERR and PTR_ERR should use the same variable, clk_ce in this case.

Fixes: 4de1eb07c47f (Convert init function to return error)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
drivers/clocksource/cadence_ttc_timer.c

index 388a77bdc39a4d88c0087999beabd1cedbf1ab91..fbfbdec13b081837e3866ee06f8a9c231cce990c 100644 (file)
@@ -523,7 +523,7 @@ static int __init ttc_timer_init(struct device_node *timer)
        clk_ce = of_clk_get(timer, clksel);
        if (IS_ERR(clk_ce)) {
                pr_err("ERROR: timer input clock not found\n");
-               return PTR_ERR(clk_cs);
+               return PTR_ERR(clk_ce);
        }
 
        ret = ttc_setup_clocksource(clk_cs, timer_baseaddr, timer_width);