diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-22 11:42:27 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-06-23 16:07:21 +0200 |
commit | 953cd66139b6e28fdc7cdbf28065a0a98ce7877c (patch) | |
tree | 48171649e2f7009f06b99c57c3a914f348865a56 /hw/sd/pl181.c | |
parent | 17d26ac61ee637a38d58b7053fdd1695ea2b7bc9 (diff) |
sd/milkymist-memcard: Fix error API violation
The Error ** argument must be NULL, &error_abort, &error_fatal, or a
pointer to a variable containing NULL. Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.
milkymist_memcard_realize() is wrong that way: it passes &err to
qdev_prop_set_drive_err() and qdev_realize_and_unref(). Currently
harmless, because the latter uses it only as first argument of
error_propagate().
Making qdev_prop_set_drive_err() fail involves abuse of -global.
Leave handling that to qdev_prop_set_drive(), like we do elsewhere.
Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200622094227.1271650-17-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/sd/pl181.c')
0 files changed, 0 insertions, 0 deletions