diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 05:04:00 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 05:04:00 -0300 |
commit | 273d4428f8c4cc94c9598f8bcc006ec2e8c654ea (patch) | |
tree | a453898167c5f6387e740a704a46b44b0a35b88a /drivers/media/usb | |
parent | 863981e96738983919de841ec669e157e6bdaeb0 (diff) |
Linux-libre 4.7.2-gnupck-4.7.2-gnu
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/usbtv/usbtv-audio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/usb/usbtv/usbtv-audio.c b/drivers/media/usb/usbtv/usbtv-audio.c index 78c12d22d..5dab02432 100644 --- a/drivers/media/usb/usbtv/usbtv-audio.c +++ b/drivers/media/usb/usbtv/usbtv-audio.c @@ -278,6 +278,9 @@ static void snd_usbtv_trigger(struct work_struct *work) { struct usbtv *chip = container_of(work, struct usbtv, snd_trigger); + if (!chip->snd) + return; + if (atomic_read(&chip->snd_stream)) usbtv_audio_start(chip); else @@ -378,6 +381,8 @@ err: void usbtv_audio_free(struct usbtv *usbtv) { + cancel_work_sync(&usbtv->snd_trigger); + if (usbtv->snd && usbtv->udev) { snd_card_free(usbtv->snd); usbtv->snd = NULL; |