aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-12-10 13:59:13 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-30 12:44:24 (GMT)
commit3b952436d4cca59bfdc8ede174dd746a4b31c804 (patch)
treeaf9772c01707be16d3f1f31eb6cb6d2b69fe4bb8 /drivers/media/pci
parent99f3cd52aee21091ce62442285a68873e3be833f (diff)
[media] cx23885: do not unregister demod I2C client twice on error
Demod I2C client should be NULL after demod is unregistered on error path, otherwise it will be unregistered again when driver is unload. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/cx23885/cx23885-dvb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index c47d182..6bb7935 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -1793,12 +1793,14 @@ static int dvb_register(struct cx23885_tsport *port)
client_tuner->dev.driver == NULL) {
module_put(client_demod->dev.driver->owner);
i2c_unregister_device(client_demod);
+ port->i2c_client_demod = NULL;
goto frontend_detach;
}
if (!try_module_get(client_tuner->dev.driver->owner)) {
i2c_unregister_device(client_tuner);
module_put(client_demod->dev.driver->owner);
i2c_unregister_device(client_demod);
+ port->i2c_client_demod = NULL;
goto frontend_detach;
}
port->i2c_client_tuner = client_tuner;
@@ -1843,12 +1845,14 @@ static int dvb_register(struct cx23885_tsport *port)
client_tuner->dev.driver == NULL) {
module_put(client_demod->dev.driver->owner);
i2c_unregister_device(client_demod);
+ port->i2c_client_demod = NULL;
goto frontend_detach;
}
if (!try_module_get(client_tuner->dev.driver->owner)) {
i2c_unregister_device(client_tuner);
module_put(client_demod->dev.driver->owner);
i2c_unregister_device(client_demod);
+ port->i2c_client_demod = NULL;
goto frontend_detach;
}
port->i2c_client_tuner = client_tuner;
@@ -1989,6 +1993,7 @@ static int dvb_register(struct cx23885_tsport *port)
client_tuner->dev.driver == NULL) {
module_put(client_demod->dev.driver->owner);
i2c_unregister_device(client_demod);
+ port->i2c_client_demod = NULL;
goto frontend_detach;
}
if (!try_module_get(client_tuner->dev.driver->owner)) {

Privacy Policy