diff options
author | Mark Brown <broonie@kernel.org> | 2023-07-09 22:43:21 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-09 22:43:21 +0100 |
commit | 3d74f42c56db263e82ad96f8fe23aef38cdc071f (patch) | |
tree | dd8ce5f730928bf7bfea78136ba8baa341d6c62b /sound/soc/amd/acp/amd.h | |
parent | 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff) | |
parent | 980d97efdb30b8baa74b61fec086becb3aedbb90 (diff) | |
download | lwn-3d74f42c56db263e82ad96f8fe23aef38cdc071f.tar.gz lwn-3d74f42c56db263e82ad96f8fe23aef38cdc071f.zip |
Merge existing fixes from asoc/for-6.5 into new branch
Diffstat (limited to 'sound/soc/amd/acp/amd.h')
-rw-r--r-- | sound/soc/amd/acp/amd.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 5f2119f42271..12a176a50fd6 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -173,7 +173,7 @@ int snd_amd_acp_find_config(struct pci_dev *pci); static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int direction) { - u64 byte_count, low = 0, high = 0; + u64 byte_count = 0, low = 0, high = 0; if (direction == SNDRV_PCM_STREAM_PLAYBACK) { switch (dai_id) { @@ -191,7 +191,7 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int break; default: dev_err(adata->dev, "Invalid dai id %x\n", dai_id); - return -EINVAL; + goto POINTER_RETURN_BYTES; } } else { switch (dai_id) { @@ -213,12 +213,13 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int break; default: dev_err(adata->dev, "Invalid dai id %x\n", dai_id); - return -EINVAL; + goto POINTER_RETURN_BYTES; } } /* Get 64 bit value from two 32 bit registers */ byte_count = (high << 32) | low; +POINTER_RETURN_BYTES: return byte_count; } |