linux-stable/sound
Amadeusz Sławiński d040e85ae9 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:18:18 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-07-20 16:10:42 +02:00
aoa
arm
atmel
core ALSA: info: Fix llseek return value when using callback 2022-08-25 11:18:18 +02:00
drivers ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-29 12:23:36 +01:00
firewire ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes 2022-05-12 12:23:40 +02:00
hda ALSA: hda/realtek - Add HW8326 support 2022-06-22 14:11:21 +02:00
i2c
isa ALSA: wavefront: Proper check of get_user() error 2022-05-25 09:14:34 +02:00
mips
oss
parisc
pci ALSA: hda/realtek: Add quirk for another Asus K42JZ model 2022-08-25 11:17:21 +02:00
pcmcia
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:10:44 +02:00
sh
soc ASoC: audio-graph-card: Add of_node_put() in fail path 2022-08-25 11:18:05 +02:00
sparc
spi ALSA: spi: Add check for clk_enable() 2022-04-15 14:18:08 +02:00
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-17 09:48:19 +01:00
usb ALSA: bcd2000: Fix a UAF bug on the error path of probing 2022-08-25 11:17:17 +02:00
x86 ALSA: intel_hdmi: Fix reference to PCM buffer address 2022-03-08 19:07:46 +01:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c