clk: stm32f4: fix error handling

This is likely that checking 'clks[idx]' instead of 'clks[n]' is
expected here.

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
Link: lkml.kernel.org/r/[email protected]
This commit is contained in:
Christophe JAILLET 2016-07-03 08:06:43 +02:00 • committed by Michael Turquette
commit 334e125b4e

View file

@ -364,7 +364,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
NULL, gd->name, gd->parent_name, gd->flags,
base + gd->offset, gd->bit_idx, 0, &stm32f4_clk_lock);
if (IS_ERR(clks[n])) {
if (IS_ERR(clks[idx])) {
pr_err("%s: Unable to register leaf clock %s\n",
np->full_name, gd->name);
goto fail;