diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-22 15:53:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 00:23:23 -0400 |
commit | 517521e4651ac106fc2a4f7638c284f60de92bb8 (patch) | |
tree | 017dc1077acccca0851ce2ccacc2b0af6430c80e /drivers/media/video/em28xx | |
parent | 7853d408b792f9015072f7c4649bd3a5d4f6ed02 (diff) |
V4L/DVB: em28xx: remove unneeded null checks
The "dev" variable is used as a list cursor in a list_for_each_entry()
loop and can never be null here so I removed the check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 331e1cac4272..44c63cbd6dda 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -1186,8 +1186,7 @@ int em28xx_register_extension(struct em28xx_ops *ops) | |||
1186 | mutex_lock(&em28xx_devlist_mutex); | 1186 | mutex_lock(&em28xx_devlist_mutex); |
1187 | list_add_tail(&ops->next, &em28xx_extension_devlist); | 1187 | list_add_tail(&ops->next, &em28xx_extension_devlist); |
1188 | list_for_each_entry(dev, &em28xx_devlist, devlist) { | 1188 | list_for_each_entry(dev, &em28xx_devlist, devlist) { |
1189 | if (dev) | 1189 | ops->init(dev); |
1190 | ops->init(dev); | ||
1191 | } | 1190 | } |
1192 | printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name); | 1191 | printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name); |
1193 | mutex_unlock(&em28xx_devlist_mutex); | 1192 | mutex_unlock(&em28xx_devlist_mutex); |
@@ -1201,10 +1200,8 @@ void em28xx_unregister_extension(struct em28xx_ops *ops) | |||
1201 | 1200 | ||
1202 | mutex_lock(&em28xx_devlist_mutex); | 1201 | mutex_lock(&em28xx_devlist_mutex); |
1203 | list_for_each_entry(dev, &em28xx_devlist, devlist) { | 1202 | list_for_each_entry(dev, &em28xx_devlist, devlist) { |
1204 | if (dev) | 1203 | ops->fini(dev); |
1205 | ops->fini(dev); | ||
1206 | } | 1204 | } |
1207 | |||
1208 | printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name); | 1205 | printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name); |
1209 | list_del(&ops->next); | 1206 | list_del(&ops->next); |
1210 | mutex_unlock(&em28xx_devlist_mutex); | 1207 | mutex_unlock(&em28xx_devlist_mutex); |