Commit 99fee508 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: caiaq: Fix stray URB at probe error path

caiaq driver doesn't kill the URB properly at its error path during
the probe, which may lead to a use-after-free error later.  This patch
addresses it.
Reported-by: default avatarJohan Hovold <>
Reviewed-by: default avatarJohan Hovold <>
Cc: <>
Signed-off-by: default avatarTakashi Iwai <>
parent 71105998
......@@ -469,10 +469,12 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
err = snd_usb_caiaq_send_command(cdev, EP1_CMD_GET_DEVICE_INFO, NULL, 0);
if (err)
return err;
goto err_kill_urb;
if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ))
return -ENODEV;
if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ)) {
err = -ENODEV;
goto err_kill_urb;
usb_string(usb_dev, usb_dev->descriptor.iManufacturer,
cdev->vendor_name, CAIAQ_USB_STR_LEN);
......@@ -507,6 +509,10 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
return 0;
return err;
static int snd_probe(struct usb_interface *intf,
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment