mirror of https://gitee.com/openkylin/qemu.git
sparc: Check dev->realized at sparc_set_nwindows()
sparc_set_nwindows() is one of the very few property setters that don't check dev->realized, and there's no reason for it to be special. Check dev->realized like the other setters. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201211220529.2290218-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
85f6f43283
commit
0ea0a42ef6
|
@ -798,11 +798,17 @@ static void sparc_get_nwindows(Object *obj, Visitor *v, const char *name,
|
|||
static void sparc_set_nwindows(Object *obj, Visitor *v, const char *name,
|
||||
void *opaque, Error **errp)
|
||||
{
|
||||
DeviceState *dev = DEVICE(obj);
|
||||
const int64_t min = MIN_NWINDOWS;
|
||||
const int64_t max = MAX_NWINDOWS;
|
||||
SPARCCPU *cpu = SPARC_CPU(obj);
|
||||
int64_t value;
|
||||
|
||||
if (dev->realized) {
|
||||
qdev_prop_set_after_realize(dev, name, errp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!visit_type_int(v, name, &value, errp)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue