aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2022-04-25 10:21:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-22 16:30:07 +0200
commit79d3e56c2071d402fd55f135aea872d8fe24d269 (patch)
tree5b52a4332cbcef5ef6101969c1c9d3115763b3a3
parentb7639b7dd05de6d4f5ac2a30bb4a7a789286992f (diff)
downloadqemu-79d3e56c2071d402fd55f135aea872d8fe24d269.zip
qemu-79d3e56c2071d402fd55f135aea872d8fe24d269.tar.gz
qemu-79d3e56c2071d402fd55f135aea872d8fe24d269.tar.bz2
hw/audio/lm4549: Add errp error reporting to init function
This will be used in future commit. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <be1bf295b3c6a3dee272b4b4e8115e37c2a772b5.1650874791.git.mkletzan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/audio/lm4549.c3
-rw-r--r--hw/audio/lm4549.h3
-rw-r--r--hw/audio/pl041.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/hw/audio/lm4549.c b/hw/audio/lm4549.c
index 32b1481..418041b 100644
--- a/hw/audio/lm4549.c
+++ b/hw/audio/lm4549.c
@@ -276,7 +276,8 @@ static int lm4549_post_load(void *opaque, int version_id)
return 0;
}
-void lm4549_init(lm4549_state *s, lm4549_callback data_req_cb, void* opaque)
+void lm4549_init(lm4549_state *s, lm4549_callback data_req_cb, void* opaque,
+ Error **errp)
{
struct audsettings as;
diff --git a/hw/audio/lm4549.h b/hw/audio/lm4549.h
index aba9bb5..61c3ab1 100644
--- a/hw/audio/lm4549.h
+++ b/hw/audio/lm4549.h
@@ -36,7 +36,8 @@ typedef struct {
extern const VMStateDescription vmstate_lm4549_state;
-void lm4549_init(lm4549_state *s, lm4549_callback data_req, void *opaque);
+void lm4549_init(lm4549_state *s, lm4549_callback data_req, void *opaque,
+ Error **errp);
uint32_t lm4549_read(lm4549_state *s, hwaddr offset);
void lm4549_write(lm4549_state *s, hwaddr offset, uint32_t value);
uint32_t lm4549_write_samples(lm4549_state *s, uint32_t left, uint32_t right);
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
index 03acd4f..868dffb 100644
--- a/hw/audio/pl041.c
+++ b/hw/audio/pl041.c
@@ -564,7 +564,7 @@ static void pl041_realize(DeviceState *dev, Error **errp)
}
/* Init the codec */
- lm4549_init(&s->codec, &pl041_request_data, (void *)s);
+ lm4549_init(&s->codec, &pl041_request_data, (void *)s, errp);
}
static const VMStateDescription vmstate_pl041_regfile = {