From d30ec107850e72d64456a93ce50a56d13d9e7939 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Thu, 30 Dec 2004 22:00:10 +0000 Subject: init state check for dvb part, forgot in the first place .. --- linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c index 3b82ac072..97747cc4e 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c @@ -196,12 +196,14 @@ success: int dibusb_dvb_exit(struct usb_dibusb *dib) { - dib->init_state &= ~DIBUSB_STATE_DVB; - deb_info("unregistering DVB part\n"); - dvb_net_release(&dib->dvb_net); - dib->demux.dmx.close(&dib->demux.dmx); - dvb_dmxdev_release(&dib->dmxdev); - dvb_dmx_release(&dib->demux); - dvb_unregister_adapter(dib->adapter); + if (dib->init_state & DIBUSB_STATE_DVB) { + dib->init_state &= ~DIBUSB_STATE_DVB; + deb_info("unregistering DVB part\n"); + dvb_net_release(&dib->dvb_net); + dib->demux.dmx.close(&dib->demux.dmx); + dvb_dmxdev_release(&dib->dmxdev); + dvb_dmx_release(&dib->demux); + dvb_unregister_adapter(dib->adapter); + } return 0; } -- cgit v1.2.3