Skip to content

Commit

Permalink
clocksource/drivers/cadence_ttc: fix a return value in case of error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Jaillet authored and Daniel Lezcano committed Jul 7, 2016
1 parent 46fd5c6 commit 34c720a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/cadence_ttc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 34c720a

Please sign in to comment.