svn commit: r321941 - head/sys/arm/allwinner/clk
Emmanuel Vadot
manu at FreeBSD.org
Wed Aug 2 20:17:06 UTC 2017
Author: manu
Date: Wed Aug 2 20:17:04 2017
New Revision: 321941
URL: https://svnweb.freebsd.org/changeset/base/321941
Log:
allwiner: modclk: Do not try to enable parent clock if it doesn't exist
Modified:
head/sys/arm/allwinner/clk/aw_modclk.c
Modified: head/sys/arm/allwinner/clk/aw_modclk.c
==============================================================================
--- head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 19:53:43 2017 (r321940)
+++ head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 20:17:04 2017 (r321941)
@@ -89,7 +89,10 @@ aw_modclk_init(struct clknode *clk, device_t dev)
index = (val & CLK_SRC_SEL) >> CLK_SRC_SEL_SHIFT;
- clknode_init_parent_idx(clk, index);
+ if (index <= clknode_get_parents_num(clk))
+ clknode_init_parent_idx(clk, index);
+ else
+ clknode_init_parent_idx(clk, 0);
return (0);
}
More information about the svn-src-all
mailing list