1. Avoid corrupting (replacing '=' with '\0') NVRAM content 2. Check actual NVRAM data length to avoid allocating huge buffers Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This stops NVMEM driver from using MMIO access past booting and messing with NAND controller state. Link: https://forum.openwrt.org/t/asus-rt-ac88u-hw-a6-broken-in-22-03-3/147882 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>