This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] c8sectpfe: Combine three checks into a single if block
Author:  Markus Elfring <[email protected]>
Date:    Thu Nov 5 16:23:50 2015 -0200

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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 .../platform/sti/c8sectpfe/c8sectpfe-common.c      |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=1ea7252d978637dca24f89c72dee887fe2bef689

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
index 07fd6d9..2dfbe8a 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c
@@ -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);
+                       }
                }
        }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to