[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>
This commit is contained in:
parent
99f3cd52ae
commit
3b952436d4
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user