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:
a74f8d0
)
ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
author
Takashi Iwai
<tiwai@suse.de>
Sun, 9 Oct 2022 10:42:11 +0000
(12:42 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Sun, 9 Oct 2022 10:43:26 +0000
(12:43 +0200)
snd_usb_endpoint_set_params() should return zero for a success, but
currently it returns the sample rate. Correct it.
Fixes:
2be79d586454
("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)")
Link:
https://lore.kernel.org/r/20221009104212.18877-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/usb/endpoint.c
b/sound/usb/endpoint.c
index da378e565ef840dd82d53d507410bac5d602d9bf..44cce6cec9dac54064bb4f06be222286c35806b6 100644
(file)
--- a/
sound/usb/endpoint.c
+++ b/
sound/usb/endpoint.c
@@
-1386,6
+1386,8
@@
int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
ep->curframesize = ep->curpacksize / ep->cur_frame_bytes;
err = update_clock_ref_rate(chip, ep);
+ if (err >= 0)
+ err = 0;
unlock:
mutex_unlock(&chip->mutex);
return err;