Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: amd: ps: fix byte count return value for invalid SoundWire manager instance

acp_get_byte_count() function should return zero bytes instead of
-EINVAL for invalid SoundWire manager instance.

Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230626105356.2580125-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vijendar Mukunda and committed by
Mark Brown
68a653ab 46b50e51

+2 -1
+2 -1
sound/soc/amd/ps/ps-sdw-dma.c
··· 318 318 pos_high_reg = sdw1_dma_ring_buf_reg[stream->stream_id].pos_high_reg; 319 319 break; 320 320 default: 321 - return -EINVAL; 321 + goto POINTER_RETURN_BYTES; 322 322 } 323 323 if (pos_low_reg) { 324 324 byte_count.bcount.high = readl(acp_base + pos_high_reg); 325 325 byte_count.bcount.low = readl(acp_base + pos_low_reg); 326 326 } 327 + POINTER_RETURN_BYTES: 327 328 return byte_count.bytescount; 328 329 } 329 330