diff options
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/line6/pcm.c | 5 | ||||
-rw-r--r-- | sound/usb/mixer_quirks.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c index 21127e4958b2..2c03e0f6bf72 100644 --- a/sound/usb/line6/pcm.c +++ b/sound/usb/line6/pcm.c @@ -556,6 +556,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); diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 1f6011f36bb0..199fa157a411 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -741,7 +741,7 @@ static int snd_ni_control_init_val(struct usb_mixer_interface *mixer, return err; } - kctl->private_value |= (value << 24); + kctl->private_value |= ((unsigned int)value << 24); return 0; } @@ -902,7 +902,7 @@ static int snd_ftu_eff_switch_init(struct usb_mixer_interface *mixer, if (err < 0) return err; - kctl->private_value |= value[0] << 24; + kctl->private_value |= (unsigned int)value[0] << 24; return 0; } |