From f0f2c2b5b40b5e621a47a6a274117cce77841f1e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 12 Jan 2011 16:59:42 -0800 Subject: 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 Acked-by: Maciej Sosnowski Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/dca/dca-core.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/dca') diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index b98c67664ae..c461eda6241 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c @@ -110,8 +110,6 @@ static void unregister_dca_providers(void) /* at this point only one domain in the list is expected */ domain = list_first_entry(&dca_domains, struct dca_domain, node); - if (!domain) - return; list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) { list_del(&dca->node); -- cgit v1.2.3