sound: usb: Treat find format failure as error

This allows to check if requested format is supported by
usb audio headset by looking at dmesg log.

Change-Id: I3051dd49a1289e4ab46bb59b3537c664a37c3ee5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2016-08-16 15:17:08 -07:00
parent 2e45ea7281
commit c2e565f1e9

View file

@ -577,7 +577,7 @@ int snd_usb_enable_audio_stream(struct snd_usb_substream *subs,
snd_usb_autoresume(subs->stream->chip);
fmt = find_format(subs);
if (!fmt) {
dev_dbg(&subs->dev->dev,
dev_err(&subs->dev->dev,
"cannot set format: format = %#x, rate = %d, channels = %d\n",
subs->pcm_format, subs->cur_rate, subs->channels);
return -EINVAL;