linux-stable/sound
Amadeusz Sławiński 1825806cc6 ALSA: info: Fix llseek return value when using callback
commit 9be080edcc upstream.

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".

Fixes: 73029e0ff1 ("ALSA: info - Implement common llseek for binary mode")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:11:31 +02:00
..
aoa ALSA: aoa: onyx: always initialize register read value 2020-01-27 14:46:41 +01:00
arm
atmel
core ALSA: info: Fix llseek return value when using callback 2022-08-25 11:11:31 +02:00
drivers ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-29 12:17:35 +01:00
firewire ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes 2022-05-12 12:17:09 +02:00
hda ALSA: hda: avoid write to STATESTS if controller is in reset 2021-10-27 09:51:41 +02:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2019-12-01 09:13:39 +01:00
isa ALSA: wavefront: Proper check of get_user() error 2022-05-25 08:41:19 +02:00
mips
oss
parisc
pci ALSA: hda/cirrus - support for iMac 12,1 model 2022-08-25 11:11:11 +02:00
pcmcia
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:17:50 +02:00
sh ALSA: sh: Fix compile warning wrt const 2020-02-28 16:36:02 +01:00
soc ASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe 2022-08-25 11:11:23 +02:00
sparc
spi ALSA: spi: Add check for clk_enable() 2022-04-20 09:08:14 +02:00
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-26 11:40:21 +01:00
usb ALSA: bcd2000: Fix a UAF bug on the error path of probing 2022-08-25 11:11:10 +02:00
x86 ALSA: intel_hdmi: Fix reference to PCM buffer address 2022-03-08 19:01:56 +01:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c sound: fix a memory leak bug 2019-08-16 10:13:46 +02:00