lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework
On 24-02-22, 13:56, Raghu Bankapur wrote:
> Propagate the error code from the compress framework for the timestamp
> query. This error code will be used by the client to handle the
> error case scenarios gracefully.
>
> Signed-off-by: Raghu Bankapur <quic_rbankapu@quicinc.com>
> ---
> sound/core/compress_offload.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index de514ec8c83d..b89adbf666b1 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -166,9 +166,12 @@ static int snd_compr_free(struct inode *inode, struct file *f)
> static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
> struct snd_compr_tstamp *tstamp)
> {
> + int ret = 0;

why initialize here, also pls leave an empty line here

> if (!stream->ops->pointer)
> return -ENOTSUPP;
> - stream->ops->pointer(stream, tstamp);
> + ret = stream->ops->pointer(stream, tstamp);
> + if (ret)
> + return ret;
> pr_debug("dsp consumed till %d total %d bytes\n",
> tstamp->byte_offset, tstamp->copied_total);
> if (stream->direction == SND_COMPRESS_PLAYBACK)
> --
> 2.17.1

--
~Vinod

\
 
 \ /
  Last update: 2022-02-24 10:55    [W:0.065 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site