diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index 2464bde1c432..281b6739b0c1 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -1255,11 +1255,6 @@ static void dvb_input_detach(struct ddb_input *input) switch (dvb->attached) { case 0x31: - client = dvb->i2c_client[0]; - if (client) { - module_put(client->dev.driver->owner); - i2c_unregister_device(client); - } if (dvb->fe2) dvb_unregister_frontend(dvb->fe2); if (dvb->fe) @@ -1273,6 +1268,12 @@ static void dvb_input_detach(struct ddb_input *input) dvb->fe = dvb->fe2 = NULL; /* fallthrough */ case 0x20: + client = dvb->i2c_client[0]; + if (client) { + module_put(client->dev.driver->owner); + i2c_unregister_device(client); + } + dvb_net_release(&dvb->dvbnet); /* fallthrough */ case 0x12: |