diff options
| -rw-r--r-- | sound/usb/caiaq/device.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index 0fb6b1b79261..d8409d9ae55b 100644 --- a/sound/usb/caiaq/device.c +++ b/sound/usb/caiaq/device.c | |||
| @@ -469,10 +469,12 @@ static int init_card(struct snd_usb_caiaqdev *cdev) | |||
| 469 | 469 | ||
| 470 | err = snd_usb_caiaq_send_command(cdev, EP1_CMD_GET_DEVICE_INFO, NULL, 0); | 470 | err = snd_usb_caiaq_send_command(cdev, EP1_CMD_GET_DEVICE_INFO, NULL, 0); |
| 471 | if (err) | 471 | if (err) |
| 472 | return err; | 472 | goto err_kill_urb; |
| 473 | 473 | ||
| 474 | if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ)) | 474 | if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ)) { |
| 475 | return -ENODEV; | 475 | err = -ENODEV; |
| 476 | goto err_kill_urb; | ||
| 477 | } | ||
| 476 | 478 | ||
| 477 | usb_string(usb_dev, usb_dev->descriptor.iManufacturer, | 479 | usb_string(usb_dev, usb_dev->descriptor.iManufacturer, |
| 478 | cdev->vendor_name, CAIAQ_USB_STR_LEN); | 480 | cdev->vendor_name, CAIAQ_USB_STR_LEN); |
| @@ -507,6 +509,10 @@ static int init_card(struct snd_usb_caiaqdev *cdev) | |||
| 507 | 509 | ||
| 508 | setup_card(cdev); | 510 | setup_card(cdev); |
| 509 | return 0; | 511 | return 0; |
| 512 | |||
| 513 | err_kill_urb: | ||
| 514 | usb_kill_urb(&cdev->ep1_in_urb); | ||
| 515 | return err; | ||
| 510 | } | 516 | } |
| 511 | 517 | ||
| 512 | static int snd_probe(struct usb_interface *intf, | 518 | static int snd_probe(struct usb_interface *intf, |
