Skip to content

Commit 9355b60

Browse files
committed
ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
snd_usb_endpoint_set_params() should return zero for a success, but currently it returns the sample rate. Correct it. Fixes: 2be79d5 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a74f8d0 commit 9355b60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/usb/endpoint.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,8 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
13861386
ep->curframesize = ep->curpacksize / ep->cur_frame_bytes;
13871387

13881388
err = update_clock_ref_rate(chip, ep);
1389+
if (err >= 0)
1390+
err = 0;
13891391
unlock:
13901392
mutex_unlock(&chip->mutex);
13911393
return err;

0 commit comments

Comments
 (0)