projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e88002
)
ALSA: gus: Fix some error handling paths related to get_bpos() usage
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Thu, 3 Oct 2024 19:34:01 +0000
(21:34 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 4 Oct 2024 07:02:30 +0000
(09:02 +0200)
If get_bpos() fails, it is likely that the corresponding error code should
be returned.
Fixes:
a6970bb1dd99
("ALSA: gus: Convert to the new PCM ops")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link:
https://patch.msgid.link/d9ca841edad697154afa97c73a5d7a14919330d9.1727984008.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/gus/gus_pcm.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/isa/gus/gus_pcm.c
b/sound/isa/gus/gus_pcm.c
index bcbcaa924c12781d0971b4f7cbae235ca83bedd8..16f9bbb43a5442a25bfcdeaafc674dd626564c2f 100644
(file)
--- a/
sound/isa/gus/gus_pcm.c
+++ b/
sound/isa/gus/gus_pcm.c
@@
-364,7
+364,7
@@
static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream,
bpos = get_bpos(pcmp, voice, pos, len);
if (bpos < 0)
- return pos;
+ return
b
pos;
if (copy_from_iter(runtime->dma_area + bpos, len, src) != len)
return -EFAULT;
return playback_copy_ack(substream, bpos, len);
@@
-381,7
+381,7
@@
static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream,
bpos = get_bpos(pcmp, voice, pos, len);
if (bpos < 0)
- return pos;
+ return
b
pos;
snd_pcm_format_set_silence(runtime->format, runtime->dma_area + bpos,
bytes_to_samples(runtime, count));
return playback_copy_ack(substream, bpos, len);