From patchwork Wed Jan 20 17:19:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 74094 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0KHKGdJ006097 for ; Wed, 20 Jan 2010 17:20:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753683Ab0ATRTl (ORCPT ); Wed, 20 Jan 2010 12:19:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753690Ab0ATRTl (ORCPT ); Wed, 20 Jan 2010 12:19:41 -0500 Received: from smtp.mujha-vel.cz ([81.30.225.246]:58087 "EHLO smtp.mujha-vel.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753663Ab0ATRTi (ORCPT ); Wed, 20 Jan 2010 12:19:38 -0500 Received: from [217.66.174.142] (helo=localhost.localdomain) by smtp.mujha-vel.cz with esmtp (Exim 4.63) (envelope-from ) id 1NXeDP-00084e-Sf; Wed, 20 Jan 2010 18:19:36 +0100 From: Jiri Slaby To: mchehab@infradead.org Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com, Antti Palosaari , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 1/1] media: dvb-usb/af9015, fix disconnection crashes Date: Wed, 20 Jan 2010 18:19:32 +0100 Message-Id: <1264007972-6261-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.6.5.7 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index f0d5731..bd20945 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -1661,6 +1661,10 @@ static void af9015_usb_device_exit(struct usb_interface *intf) struct dvb_usb_device *d = usb_get_intfdata(intf); deb_info("%s: \n", __func__); + /* we do nothing for remote controller interface */ + if (intf->cur_altsetting->desc.bInterfaceNumber != 0) + return; + /* remove 2nd I2C adapter */ if (d != NULL && d->desc != NULL) af9015_i2c_exit(d);