[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200609110846.4029620-1-noltari@gmail.com>
Date: Tue, 9 Jun 2020 13:08:46 +0200
From: Álvaro Fernández Rojas
<noltari@...il.com>
To: mturquette@...libre.com, sboyd@...nel.org, f.fainelli@...il.com,
bcm-kernel-feedback-list@...adcom.com, lkp@...el.com,
jonas.gorski@...il.com, f4bug@...at.org, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Álvaro Fernández Rojas
<noltari@...il.com>
Subject: [PATCH] clk: bcm63xx-gate: fix last clock availability
In order to make the last clock available, maxbit has to be set to the
highest bit value plus 1.
Fixes: 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver")
Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
---
drivers/clk/bcm/clk-bcm63xx-gate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/bcm/clk-bcm63xx-gate.c b/drivers/clk/bcm/clk-bcm63xx-gate.c
index 98e884957db8..911a29bd744e 100644
--- a/drivers/clk/bcm/clk-bcm63xx-gate.c
+++ b/drivers/clk/bcm/clk-bcm63xx-gate.c
@@ -155,6 +155,7 @@ static int clk_bcm63xx_probe(struct platform_device *pdev)
for (entry = table; entry->name; entry++)
maxbit = max_t(u8, maxbit, entry->bit);
+ maxbit++;
hw = devm_kzalloc(&pdev->dev, struct_size(hw, data.hws, maxbit),
GFP_KERNEL);
--
2.26.2
Powered by blists - more mailing lists