fix: increase count of mtd partitions to set ro

UNVR with USB drive has 10 on SPI, so we need to make sure we cover them all.
This commit is contained in:
Chris Blake 2024-06-16 13:55:44 -05:00
parent 116b6591a9
commit 02258ae02f

View file

@ -53,8 +53,8 @@ int ubnt_mtd_lock_init(void)
{
int i, err;
/* For all MTD partitions, go RO. Assume <10 for UNVR/UNVRPRO */
for (i = 0; i < 10; ++i) {
/* For all MTD partitions, go RO. Assume <15 for UNVR/UNVRPRO, as UNVR OG has 10 */
for (i = 0; i < 15; ++i) {
err = set_readonly(i);
if (err == -ENODEV) {
break;