diff options
author | David Hildenbrand <david@redhat.com> | 2018-06-19 15:41:40 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-06-28 19:05:34 +0200 |
commit | a4659a8ef424928f654707ca637ba133cbe22396 (patch) | |
tree | e915cb060bf3075b50021a26bc3a2f398442281b /chardev | |
parent | eb7fd4d0f64fcab2da9ae454a1f214174e881372 (diff) | |
download | qemu-a4659a8ef424928f654707ca637ba133cbe22396.zip qemu-a4659a8ef424928f654707ca637ba133cbe22396.tar.gz qemu-a4659a8ef424928f654707ca637ba133cbe22396.tar.bz2 |
nvdimm: make get_memory_region() perform checks and initialization
We might get a call to get_memory_region() before the device has been
realized. We should return a consistent value, as the return value
will e.g. later on be used in the pre_plug handler.
To avoid duplicating too much code, factor the initialization and checks
out into a helper function.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180619134141.29478-12-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'chardev')
0 files changed, 0 insertions, 0 deletions