diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2017-07-27 18:17:54 +0200 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2017-08-04 17:49:31 +0200 |
commit | de2bc4178b8d475fb0bc06c280606fdf816a3f6c (patch) | |
tree | c0f4c817220db3e6b1a82925f267ffd927d207f6 /drivers/clk/meson/meson8b.c | |
parent | 0f9b973b65910eeb0f73bb1a2178bc0826a1b791 (diff) | |
download | linux-de2bc4178b8d475fb0bc06c280606fdf816a3f6c.tar.bz2 |
clk: meson: meson8b: fix protection against undefined clks
meson8b clock driver gracefully handles case where the clkid is defined
but the clock hw pointer is not provided, as long as it is not at the end
of the hw_onecell_data array.
This patch ensure that the last entries are defined as well to handle
this particular case.
Fixes: e92f7cca446e ("clk: meson8b: clean up fixed rate clocks")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/meson8b.c')
-rw-r--r-- | drivers/clk/meson/meson8b.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index bb3f1de876b1..7629aa09472a 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -585,6 +585,7 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = { [CLKID_MPLL0] = &meson8b_mpll0.hw, [CLKID_MPLL1] = &meson8b_mpll1.hw, [CLKID_MPLL2] = &meson8b_mpll2.hw, + [CLK_NR_CLKS] = NULL, }, .num = CLK_NR_CLKS, }; |