summaryrefslogtreecommitdiff
path: root/sound/usb/line6
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-07 11:29:03 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-07 11:29:30 +0200
commitb89b889a326a7abf1c9ceef7ddbe06dbaf8c2520 (patch)
treed4f6a91d90fee3da58080dbd2c43a469dc5503a4 /sound/usb/line6
parentd4bd30532688558a7de70f0c8edd2a7a25c3963f (diff)
parent774a075ab5140bb4504e6026bf327021926c3e65 (diff)
downloadlinux-riscv-b89b889a326a7abf1c9ceef7ddbe06dbaf8c2520.tar.gz
linux-riscv-b89b889a326a7abf1c9ceef7ddbe06dbaf8c2520.tar.bz2
linux-riscv-b89b889a326a7abf1c9ceef7ddbe06dbaf8c2520.zip
Merge branch 'topic/hda-refresh-cleanup' into for-next
Merge a cleanup for HD-audio widget refresh code Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6')
-rw-r--r--sound/usb/line6/pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
index 72c6f8e82a7e..78c2d6cab3b5 100644
--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -560,6 +560,11 @@ int line6_init_pcm(struct usb_line6 *line6,
line6pcm->max_packet_size_out =
usb_maxpacket(line6->usbdev,
usb_sndisocpipe(line6->usbdev, ep_write), 1);
+ if (!line6pcm->max_packet_size_in || !line6pcm->max_packet_size_out) {
+ dev_err(line6pcm->line6->ifcdev,
+ "cannot get proper max packet size\n");
+ return -EINVAL;
+ }
spin_lock_init(&line6pcm->out.lock);
spin_lock_init(&line6pcm->in.lock);