diff options
author | Julia Lawall <julia@diku.dk> | 2010-08-03 23:34:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 11:13:15 -0700 |
commit | a3d7fc5ce9f5985ce5230e336f104608835693a1 (patch) | |
tree | 5c198395c5645e34aad7e5a7b95bcdf4a696d660 /drivers/staging/tm6000 | |
parent | ace9115712f64315d59a86146103f6f6fc32cde3 (diff) | |
download | kernel_samsung_smdk4412-a3d7fc5ce9f5985ce5230e336f104608835693a1.zip kernel_samsung_smdk4412-a3d7fc5ce9f5985ce5230e336f104608835693a1.tar.gz kernel_samsung_smdk4412-a3d7fc5ce9f5985ce5230e336f104608835693a1.tar.bz2 |
staging: Drop unnecessary null test
list_for_each_entry binds its first argument to a non-null value, and thus
any null test on the value of that argument is superfluous.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
iterator I;
expression x;
statement S;
@@
I(x,...) { <...
- if (x != NULL || ...)
S
...> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tm6000')
-rw-r--r-- | drivers/staging/tm6000/tm6000-core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index cded411..80f2bf0 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -702,10 +702,8 @@ void tm6000_unregister_extension(struct tm6000_ops *ops) struct tm6000_core *dev = NULL; mutex_lock(&tm6000_devlist_mutex); - list_for_each_entry(dev, &tm6000_devlist, devlist) { - if (dev) - ops->fini(dev); - } + list_for_each_entry(dev, &tm6000_devlist, devlist) + ops->fini(dev); mutex_lock(&tm6000_extension_devlist_lock); printk(KERN_INFO "tm6000: Remove (%s) extension\n", ops->name); |