Skip to content

Commit 68a653a

Browse files
vijendarmukundabroonie
authored andcommitted
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: f722917 ("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>
1 parent 46b50e5 commit 68a653a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sound/soc/amd/ps/ps-sdw-dma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,13 @@ static u64 acp63_sdw_get_byte_count(struct acp_sdw_dma_stream *stream, void __io
318318
pos_high_reg = sdw1_dma_ring_buf_reg[stream->stream_id].pos_high_reg;
319319
break;
320320
default:
321-
return -EINVAL;
321+
goto POINTER_RETURN_BYTES;
322322
}
323323
if (pos_low_reg) {
324324
byte_count.bcount.high = readl(acp_base + pos_high_reg);
325325
byte_count.bcount.low = readl(acp_base + pos_low_reg);
326326
}
327+
POINTER_RETURN_BYTES:
327328
return byte_count.bytescount;
328329
}
329330

0 commit comments

Comments
 (0)