diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-28 07:29:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:57:25 -0400 |
commit | a9fac6b1487aea9f5aaefe93def522fab477f5dc (patch) | |
tree | 87a8988e9043cef2128874857feea34ec69ba6cc /drivers/media/video/cx231xx | |
parent | 3a67b5cc6f6ae37500b8f41fd52628395f7276a8 (diff) |
V4L/DVB: video/cx231xx: cleanup. remove unneed null checks
"dev" is never NULL here so there is no need to check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-core.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c index b24eee115e7e..f5e1a2315fcc 100644 --- a/drivers/media/video/cx231xx/cx231xx-core.c +++ b/drivers/media/video/cx231xx/cx231xx-core.c | |||
@@ -96,10 +96,9 @@ int cx231xx_register_extension(struct cx231xx_ops *ops) | |||
96 | mutex_lock(&cx231xx_devlist_mutex); | 96 | mutex_lock(&cx231xx_devlist_mutex); |
97 | mutex_lock(&cx231xx_extension_devlist_lock); | 97 | mutex_lock(&cx231xx_extension_devlist_lock); |
98 | list_add_tail(&ops->next, &cx231xx_extension_devlist); | 98 | list_add_tail(&ops->next, &cx231xx_extension_devlist); |
99 | list_for_each_entry(dev, &cx231xx_devlist, devlist) { | 99 | list_for_each_entry(dev, &cx231xx_devlist, devlist) |
100 | if (dev) | 100 | ops->init(dev); |
101 | ops->init(dev); | 101 | |
102 | } | ||
103 | printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name); | 102 | printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name); |
104 | mutex_unlock(&cx231xx_extension_devlist_lock); | 103 | mutex_unlock(&cx231xx_extension_devlist_lock); |
105 | mutex_unlock(&cx231xx_devlist_mutex); | 104 | mutex_unlock(&cx231xx_devlist_mutex); |
@@ -112,10 +111,8 @@ void cx231xx_unregister_extension(struct cx231xx_ops *ops) | |||
112 | struct cx231xx *dev = NULL; | 111 | struct cx231xx *dev = NULL; |
113 | 112 | ||
114 | mutex_lock(&cx231xx_devlist_mutex); | 113 | mutex_lock(&cx231xx_devlist_mutex); |
115 | list_for_each_entry(dev, &cx231xx_devlist, devlist) { | 114 | list_for_each_entry(dev, &cx231xx_devlist, devlist) |
116 | if (dev) | 115 | ops->fini(dev); |
117 | ops->fini(dev); | ||
118 | } | ||
119 | 116 | ||
120 | mutex_lock(&cx231xx_extension_devlist_lock); | 117 | mutex_lock(&cx231xx_extension_devlist_lock); |
121 | printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name); | 118 | printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name); |