Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698157

[PATCH 1/2] clk: meson: meson8b: fix protection against undefined clks

From Jerome Brunet <jbrunet@baylibre.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] clk: meson: meson8b: fix protection against undefined clks
Date 2017-07-27 18:20 +0200
Message-ID <u7TG4-8lQ-63@gated-at.bofh.it> (permalink)
References <u7TG3-8lQ-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/clk/meson/meson8b.c | 1 +
 1 file changed, 1 insertion(+)

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,
 };
-- 
2.9.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] clk: meson: fix protection against undefined clks Jerome Brunet <jbrunet@baylibre.com> - 2017-07-27 18:20 +0200
  [PATCH 1/2] clk: meson: meson8b: fix protection against undefined clks Jerome Brunet <jbrunet@baylibre.com> - 2017-07-27 18:20 +0200
  [PATCH 2/2] clk: meson: gxbb: fix protection against undefined clks Jerome Brunet <jbrunet@baylibre.com> - 2017-07-27 18:30 +0200
  Re: [PATCH 0/2] clk: meson: fix protection against undefined clks Neil Armstrong <narmstrong@baylibre.com> - 2017-07-28 12:10 +0200

csiph-web