[PATCH 3/4] mtd: core: fix error path for nvmem provider