Skip to content

Commit

Permalink
dca: remove unneeded NULL check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Maciej Sosnowski <[email protected]>
Cc: David Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
error27 authored and torvalds committed Jan 13, 2011
1 parent 455cd5a commit f0f2c2b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/dca/dca-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f0f2c2b

Please sign in to comment.