diff options
author | Dan Carpenter <error27@gmail.com> | 2011-01-12 19:59:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:09 -0500 |
commit | f0f2c2b5b40b5e621a47a6a274117cce77841f1e (patch) | |
tree | 1ca673aaf564af6a91468ca807b99b5b28dc23dd /drivers/dca | |
parent | 455cd5ab305c90ffc422dd2e0fb634730942b257 (diff) |
dca: remove unneeded NULL check
The return here doesn't release the locks or re-enable IRQs. But as
Andrew Morton points out, domain is never NULL. list_first_entry()
essentially never returns NULL and also we already verified that the list
is not empty.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/dca')
-rw-r--r-- | drivers/dca/dca-core.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index b98c67664ae7..c461eda62411 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -110,8 +110,6 @@ static void unregister_dca_providers(void) | |||
110 | 110 | ||
111 | /* at this point only one domain in the list is expected */ | 111 | /* at this point only one domain in the list is expected */ |
112 | domain = list_first_entry(&dca_domains, struct dca_domain, node); | 112 | domain = list_first_entry(&dca_domains, struct dca_domain, node); |
113 | if (!domain) | ||
114 | return; | ||
115 | 113 | ||
116 | list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) { | 114 | list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) { |
117 | list_del(&dca->node); | 115 | list_del(&dca->node); |