Re: [RESEND][PATCH] ALSA: info: Fix llseek return value when using callback

From: Takashi Iwai
Date: Wed Aug 17 2022 - 09:16:13 EST


On Wed, 17 Aug 2022 14:49:24 +0200,
Amadeusz Sławiński wrote:
>
> When using callback there was a flow of
>
> ret = -EINVAL
> if (callback) {
> offset = callback();
> goto out;
> }
> ...
> offset = some other value in case of no callback;
> ret = offset;
> out:
> return ret;
>
> which causes the snd_info_entry_llseek() to return -EINVAL when there is
> callback handler. Fix this by setting "ret" directly to callback return
> value before jumping to "out".
>
> 73029e0ff18d ("ALSA: info - Implement common llseek for binary mode")

Fixes tag seems missing. I corrected locally.

> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx>

Applied now (with Cc to stable).


thanks,

Takashi