mtd: Fix compile failure and error path in physmap.c