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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
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);
}
}