memory: Fix bad error handling in memory_region_init_ram_ptr()