Commit 06b6fea8 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] c8sectpfe: Delete unnecessary checks before two function calls

The functions i2c_put_adapter() and module_put() test whether their
argument is NULL and then return immediately.
Thus the tests around their calls are not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 4dc0e908
......@@ -214,12 +214,11 @@ void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe,
dvb_frontend_detach(tsin->frontend);
}
if (tsin && tsin->i2c_adapter)
if (tsin)
i2c_put_adapter(tsin->i2c_adapter);
if (tsin && tsin->i2c_client) {
if (tsin->i2c_client->dev.driver->owner)
module_put(tsin->i2c_client->dev.driver->owner);
module_put(tsin->i2c_client->dev.driver->owner);
i2c_unregister_device(tsin->i2c_client);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment