dca: remove unneeded NULL check
authorDan Carpenter <[email protected]>
Thu, 13 Jan 2011 00:59:42 +0000 (16:59 -0800)
committerLinus Torvalds <[email protected]>
Thu, 13 Jan 2011 16:03:09 +0000 (08:03 -0800)
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]>
drivers/dca/dca-core.c

index b98c67664ae72b7638bdf06365fd0789eb76245e..c461eda6241159ac52ee279bf681778d2f6a7390 100644 (file)
@@ -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);