summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-11-05 15:55:19 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-19 10:09:56 -0200
commit06b6fea859caa909e4e89551da9c1162c55efbc3 (patch)
tree39495429a4e35d5f34e28c7fed0127c66c38d3a2 /drivers/media/platform
parent4dc0e908a5512f6ff4be2b4cbb128495c1eaf1ba (diff)
downloadblackbird-obmc-linux-06b6fea859caa909e4e89551da9c1162c55efbc3.tar.gz
blackbird-obmc-linux-06b6fea859caa909e4e89551da9c1162c55efbc3.zip
[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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
index 95223ab71e19..07fd6d9ee53a 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
@@ -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);
}
}
OpenPOWER on IntegriCloud