aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/intel-hda.c
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2022-04-25 10:21:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-22 16:30:07 +0200
commitb7639b7dd05de6d4f5ac2a30bb4a7a789286992f (patch)
tree964584a4858dd29a76ffbd4052ee494d938c3a6a /hw/audio/intel-hda.c
parent38e476e88e7d5294c194d36d33e12f3d936a7e6a (diff)
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>
Diffstat (limited to 'hw/audio/intel-hda.c')
-rw-r--r--hw/audio/intel-hda.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index b9ed231fe8..78ff9f9a68 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -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)