ALSA: usb-audio: Don't try to submit URBs after disconnection
authorTakashi Iwai <tiwai@suse.de>
Mon, 28 Aug 2023 10:19:24 +0000 (12:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Aug 2023 13:03:35 +0000 (15:03 +0200)
commitab574d1629552b6831cd91b926b38092c15d6142
tree4a542f8d40e74d70a2eec0b7bd0b3fe8152de637
parentb94a62a663d3c863fac320a6bf60bf8bcf93d81d
ALSA: usb-audio: Don't try to submit URBs after disconnection

USB-audio driver can still submit URBs while the device is being
disconnected, and it may result in spurious error messages like:
  usb 1-2: cannot submit urb (err = -19)
  usb 1-2: Unable to submit urb #0: -19 at snd_usb_queue_pending_output_urbs
  usb 1-2: cannot submit urb 0, error -19: no device
Although those are harmless, they are just ugly.

This patch tries to avoid spewing such error messages when the device
is already at the disconnected state.  It also skips the superfluous
xfer notification, too.

Link: https://lore.kernel.org/r/20230828101924.27107-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c