diff options
Diffstat (limited to 'kernel/drivers/media/usb/usbtv/usbtv-audio.c')
-rw-r--r-- | kernel/drivers/media/usb/usbtv/usbtv-audio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/drivers/media/usb/usbtv/usbtv-audio.c b/kernel/drivers/media/usb/usbtv/usbtv-audio.c index 78c12d22d..5dab02432 100644 --- a/kernel/drivers/media/usb/usbtv/usbtv-audio.c +++ b/kernel/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; |