From patchwork Sun Jan 12 23:00:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3473441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66552C02DD for ; Mon, 13 Jan 2014 02:04:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A543320103 for ; Mon, 13 Jan 2014 02:04:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6BC620122 for ; Mon, 13 Jan 2014 02:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbaAMCEb (ORCPT ); Sun, 12 Jan 2014 21:04:31 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:49540 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbaAMCE1 (ORCPT ); Sun, 12 Jan 2014 21:04:27 -0500 Received: from [177.143.150.208] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2Wt6-00052b-MT; Mon, 13 Jan 2014 02:04:25 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1W2U1S-0006zl-G1; Sun, 12 Jan 2014 21:00:50 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 4/7] em28xx-audio: disconnect before freeing URBs Date: Sun, 12 Jan 2014 21:00:46 -0200 Message-Id: <1389567649-26838-5-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1389567649-26838-1-git-send-email-m.chehab@samsung.com> References: <1389567649-26838-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP URBs might be in usage. Disconnect the device before freeing them. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index 8e959dae8358..cdc2fcf3e05e 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -958,6 +958,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) {