MALI: bifrost: fixes wrong number of regulators

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Icb1e4a388e6e8720036b6a1d85a13b5e2491cf4d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
Caesar Wang
2021-11-23 15:04:26 +08:00
committed by Tao Huang
parent 7785ff2166
commit 2084b9f118

View File

@@ -4421,7 +4421,7 @@ int power_control_init(struct kbase_device *kbdev)
* Any other error is ignored and the driver will continue
* operating with a partial initialization of regulators.
*/
for (i = 0; i < BASE_MAX_NR_CLOCKS_REGULATORS; i++) {
for (i = 0; i < ARRAY_SIZE(regulator_names); i++) {
kbdev->regulators[i] = regulator_get_optional(kbdev->dev,
regulator_names[i]);
if (IS_ERR_OR_NULL(kbdev->regulators[i])) {