Commit cf8030d7 authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Stephen Boyd

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: 1c099779 ("clk: add BCM63XX gated clock controller driver")
Signed-off-by: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
Link: https://lore.kernel.org/r/20200609110846.4029620-1-noltari@gmail.comReviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent b3a9e3b9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment