+ dca-remove-unneeded-null-check.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     dca: remove unneeded NULL check
has been added to the -mm tree.  Its filename is
     dca-remove-unneeded-null-check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: dca: remove unneeded NULL check
From: Dan Carpenter <error27@xxxxxxxxx>

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@xxxxxxxxx>
Acked-by: Maciej Sosnowski <maciej.sosnowski@xxxxxxxxx>
Cc: David Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/dca/dca-core.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN drivers/dca/dca-core.c~dca-remove-unneeded-null-check drivers/dca/dca-core.c
--- a/drivers/dca/dca-core.c~dca-remove-unneeded-null-check
+++ a/drivers/dca/dca-core.c
@@ -110,8 +110,6 @@ static void unregister_dca_providers(voi
 
 	/* 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);
_

Patches currently in -mm which might be from error27@xxxxxxxxx are

linux-next.patch
dca-remove-unneeded-null-check.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux