diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-06-09 14:08:46 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2020-06-20 03:01:25 +0300 |
commit | cf8030d7035bd3e89c9e66f7193a7fc8057a9b9a (patch) | |
tree | 7b8e4b132e219515ed870ccfe8521169002e6296 /drivers/clk/bcm | |
parent | b3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff) | |
download | linux-cf8030d7035bd3e89c9e66f7193a7fc8057a9b9a.tar.xz |
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@gmail.com>
Link: https://lore.kernel.org/r/20200609110846.4029620-1-noltari@gmail.com
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/bcm')
-rw-r--r-- | drivers/clk/bcm/clk-bcm63xx-gate.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |