[PATCH 6.1 0679/1146] riscv: Fix crash during early errata patching