[media] em28xx-audio: disconnect before freeing URBs
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 12 Jan 2014 21:14:05 +0000 (18:14 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 14 Jan 2014 16:36:29 +0000 (14:36 -0200)
URBs might be in usage. Disconnect the device before freeing
them.

Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-audio.c

index 97d9105e68303852bd1323a9c2ad24ee9e1b6b59..7f762db94b5f774d57c9ed20f779b2565726099c 100644 (file)
@@ -956,6 +956,7 @@ static int em28xx_audio_fini(struct em28xx *dev)
                return 0;
        }
 
+       snd_card_disconnect(dev->adev.sndcard);
        em28xx_audio_free_urb(dev);
 
        if (dev->adev.sndcard) {