[PATCH] regulator: rn5t618: Fix Fix out of bounds array access

2017-04-15 Thread Axel Lin
The commit "regulator: rn5t618: Add RN5T567 PMIC support" added RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. So for rn5t618, there is out of bounds array access when checking regulators[i].name in the for loop. The number of regulators is different for rn5t567 and rn5t618, so

[PATCH] regulator: rn5t618: Fix Fix out of bounds array access

2017-04-15 Thread Axel Lin
The commit "regulator: rn5t618: Add RN5T567 PMIC support" added RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. So for rn5t618, there is out of bounds array access when checking regulators[i].name in the for loop. The number of regulators is different for rn5t567 and rn5t618, so