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

Subject: V4L/DVB: video/cx231xx: cleanup. remove unneed null checks
Author:  Dan Carpenter <[email protected]>
Date:    Sun Mar 28 08:29:35 2010 -0300

"dev" is never NULL here so there is no need to check.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/cx231xx/cx231xx-core.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=47d5083ad08662c3c041ef1964706206eb277b97

diff --git a/drivers/media/video/cx231xx/cx231xx-core.c 
b/drivers/media/video/cx231xx/cx231xx-core.c
index 4a60dfb..866fb12 100644
--- a/drivers/media/video/cx231xx/cx231xx-core.c
+++ b/drivers/media/video/cx231xx/cx231xx-core.c
@@ -95,10 +95,9 @@ int cx231xx_register_extension(struct cx231xx_ops *ops)
        mutex_lock(&cx231xx_devlist_mutex);
        mutex_lock(&cx231xx_extension_devlist_lock);
        list_add_tail(&ops->next, &cx231xx_extension_devlist);
-       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
-               if (dev)
-                       ops->init(dev);
-       }
+       list_for_each_entry(dev, &cx231xx_devlist, devlist)
+               ops->init(dev);
+
        printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name);
        mutex_unlock(&cx231xx_extension_devlist_lock);
        mutex_unlock(&cx231xx_devlist_mutex);
@@ -111,10 +110,8 @@ void cx231xx_unregister_extension(struct cx231xx_ops *ops)
        struct cx231xx *dev = NULL;
 
        mutex_lock(&cx231xx_devlist_mutex);
-       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
-               if (dev)
-                       ops->fini(dev);
-       }
+       list_for_each_entry(dev, &cx231xx_devlist, devlist)
+               ops->fini(dev);
 
        mutex_lock(&cx231xx_extension_devlist_lock);
        printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name);

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

Reply via email to