diff options
author | Alex Elder <alex.elder@linaro.org> | 2013-09-05 13:33:24 (GMT) |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-09-09 21:10:10 (GMT) |
commit | 12d298865ec5d0f14dd570c3506c270880769ed7 (patch) | |
tree | 2bd42e97f917dc9f9122e6f672d26edce472d022 /arch/.gitignore | |
parent | 22e9e7589e7bc6006af983f73e4a4057dbd9da66 (diff) | |
download | linux-fsl-qoriq-12d298865ec5d0f14dd570c3506c270880769ed7.tar.xz |
clk: only call get_parent if there is one
In __clk_init(), after a clock is mostly initialized, a scan is done
of the orphan clocks to see if the clock being registered is the
parent of any of them.
This code assumes that any clock that provides a get_parent method
actually has at least one parent, and that's not a valid assumption.
As a result, an orphan clock with no parent can return *something*
as the parent index, and that value is blindly used to dereference
the orphan's parent_names[] array (which will be ZERO_SIZE_PTR or
NULL).
Fix this by ensuring get_parent is only called for orphans with at
least one parent.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/.gitignore')
0 files changed, 0 insertions, 0 deletions