mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 01:36:48 +07:00
[media] c8sectpfe: Combine three checks into a single if block
The variable "tsin" was checked three times in a loop iteration of the c8sectpfe_tuner_unregister_frontend() function. This implementation detail could be improved by the combination of the involved statements into a single if block so that this variable will be checked only once there. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
06b6fea859
commit
1ea7252d97
@ -209,17 +209,18 @@ void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe,
|
||||
|
||||
tsin = fei->channel_data[n];
|
||||
|
||||
if (tsin && tsin->frontend) {
|
||||
dvb_unregister_frontend(tsin->frontend);
|
||||
dvb_frontend_detach(tsin->frontend);
|
||||
}
|
||||
if (tsin) {
|
||||
if (tsin->frontend) {
|
||||
dvb_unregister_frontend(tsin->frontend);
|
||||
dvb_frontend_detach(tsin->frontend);
|
||||
}
|
||||
|
||||
if (tsin)
|
||||
i2c_put_adapter(tsin->i2c_adapter);
|
||||
|
||||
if (tsin && tsin->i2c_client) {
|
||||
module_put(tsin->i2c_client->dev.driver->owner);
|
||||
i2c_unregister_device(tsin->i2c_client);
|
||||
if (tsin->i2c_client) {
|
||||
module_put(tsin->i2c_client->dev.driver->owner);
|
||||
i2c_unregister_device(tsin->i2c_client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user