提交 f0f2c2b5 编写于 作者: D Dan Carpenter 提交者: Linus Torvalds

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: NDan Carpenter <error27@gmail.com>
Acked-by: NMaciej Sosnowski <maciej.sosnowski@intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 455cd5ab
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册