In commit 40f8214fcd ("hw/audio/pcspk: Inline pcspk_init()")
we neglected to give a change to the caller to handle failed
device creation cleanly. Here this can not happen because
pc_basic_device_init() uses &error_fatal. Anyhow, do the
proper error reporting to avoid bad code example spreading.
Reported-by: Bernhard Beschow <shentey@gmail.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)