mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hw/audio: Simplify hda audio init
No return values are used anywhere, so switch the functions to be void and add support for error reporting using errp for use in next patches. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <cd1df4ad2a6fae969c4a02a77955c4a8c0d430b6.1650874791.git.mkletzan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
38e476e88e
commit
b7639b7dd0
3 changed files with 20 additions and 18 deletions
|
@ -71,9 +71,7 @@ static void hda_codec_dev_realize(DeviceState *qdev, Error **errp)
|
|||
return;
|
||||
}
|
||||
bus->next_cad = dev->cad + 1;
|
||||
if (cdc->init(dev) != 0) {
|
||||
error_setg(errp, "HDA audio init failed");
|
||||
}
|
||||
cdc->init(dev, errp);
|
||||
}
|
||||
|
||||
static void hda_codec_dev_unrealize(DeviceState *qdev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue