lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Sep 2013 16:11:15 +0200
From:	Veaceslav Falico <vfalico@...hat.com>
To:	linux-pci@...r.kernel.org
Cc:	Veaceslav Falico <vfalico@...hat.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Neil Horman <nhorman@...driver.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] msi: remove useless kobject_del() in free_msi_irqs()

We only need to kobject_put() on removal (which will, eventually, call
kobject_del()). kobject_del() should be implicitly used only on circular
references (per documentation), however it's not the case here.

CC: Bjorn Helgaas <bhelgaas@...gle.com>
CC: Neil Horman <nhorman@...driver.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: linux-pci@...r.kernel.org
CC: linux-kernel@...r.kernel.org
Signed-off-by: Veaceslav Falico <vfalico@...hat.com>
---
 drivers/pci/msi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index dafda2b..d62c468 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -384,12 +384,10 @@ static void free_msi_irqs(struct pci_dev *dev)
 		 * kobject->release will take care of freeing the entry via
 		 * msi_kobj_release().
 		 */
-		if (entry->kobj.parent) {
-			kobject_del(&entry->kobj);
+		if (entry->kobj.parent)
 			kobject_put(&entry->kobj);
-		} else {
+		else
 			kfree(entry);
-		}
 	}
 
 	if (dev->msi_kset) {
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ