aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-06-08 14:48:11 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-06-12 10:44:36 +1000
commitfcc8ef17e264ef6f4afb6fa4af71b88993f49363 (patch)
tree75fdb69a95a4673c54f2e554fd460fb481d46e63 /hw
parentbfda32a87bc77b9fac83f6c2789d65585115970d (diff)
spapr: no need to verify the node
The node property can always be queried and the value has already been verified in pc_dimm_realize(). Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 2375cbee12..f16a0b2870 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3578,14 +3578,8 @@ static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,
error_setg(errp, "Memory hotplug not supported for this machine");
return;
}
- node = object_property_get_uint(OBJECT(dev), PC_DIMM_NODE_PROP, errp);
- if (*errp) {
- return;
- }
- if (node < 0 || node >= MAX_NODES) {
- error_setg(errp, "Invaild node %d", node);
- return;
- }
+ node = object_property_get_uint(OBJECT(dev), PC_DIMM_NODE_PROP,
+ &error_abort);
spapr_memory_plug(hotplug_dev, dev, node, errp);
} else if (object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_CPU_CORE)) {