Commit f0f2c2b5b40b5e621a47a6a274117cce77841f1e

Authored by Dan Carpenter
Committed by Linus Torvalds
1 parent 455cd5ab30

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>

Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff

drivers/dca/dca-core.c
... ... @@ -110,8 +110,6 @@
110 110  
111 111 /* at this point only one domain in the list is expected */
112 112 domain = list_first_entry(&dca_domains, struct dca_domain, node);
113   - if (!domain)
114   - return;
115 113  
116 114 list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
117 115 list_del(&dca->node);