On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote:
[...]
> static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm)
> {
> - return host_memory_backend_get_memory(dimm->hostmem, &error_abort);
> + Error *local_err = NULL;
> + MemoryRegion *mr;
> +
> + mr = host_memory_backend_get_memory(dimm->hostmem, &local_err);
> +
> + /*
> + * plug a pc-dimm device whose backend memory was not properly
> + * initialized?
> + */
> + assert(!local_err && mr);
I don't know if you are going to remove the errp parameter in the next
version, but if you want to simply abort in case an error is reported by
a function, you can use &error_abort.
--
Eduardo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html