Skip to content

Commit

Permalink
hw/audio/lm4549: Add errp error reporting to init function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nertpinx authored and bonzini committed Sep 22, 2023
1 parent b7639b7 commit 79d3e56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion hw/audio/lm4549.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion hw/audio/lm4549.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion hw/audio/pl041.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 79d3e56

Please sign in to comment.