Skip to content

Commit

Permalink
hw/arm/armsse: Pass correct child size to sysbus_init_child_obj()
Browse files Browse the repository at this point in the history
armsse_init() initializes s->armv7m[i] for all i.  It passes the size
of the entire array instead of the array element to
sysbus_init_child_obj().  Harmless, but fix it anyway.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-43-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Jun 15, 2020
1 parent 8352a5b commit 287f431
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/arm/armsse.c
Expand Up @@ -257,7 +257,8 @@ static void armsse_init(Object *obj)

name = g_strdup_printf("armv7m%d", i);
sysbus_init_child_obj(OBJECT(&s->cluster[i]), name,
&s->armv7m[i], sizeof(s->armv7m), TYPE_ARMV7M);
&s->armv7m[i], sizeof(s->armv7m[i]),
TYPE_ARMV7M);
qdev_prop_set_string(DEVICE(&s->armv7m[i]), "cpu-type",
ARM_CPU_TYPE_NAME("cortex-m33"));
g_free(name);
Expand Down

0 comments on commit 287f431

Please sign in to comment.