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:	Tue, 20 Jan 2015 03:55:03 -0800
From:	tip-bot for Andy Shevchenko <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	hpa@...or.com, andriy.shevchenko@...ux.intel.com,
	linux-kernel@...r.kernel.org, rafael.j.wysocki@...el.com,
	tglx@...utronix.de, mingo@...nel.org, aubrey.li@...ux.intel.com,
	mahesh.kumar.p@...el.com
Subject: [tip:x86/platform] x86: pmc_atom: don%27t check for NULL twice

Commit-ID:  d5df8fe34bec4539e259525feabd16efccf16750
Gitweb:     http://git.kernel.org/tip/d5df8fe34bec4539e259525feabd16efccf16750
Author:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
AuthorDate: Wed, 14 Jan 2015 18:39:32 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 20 Jan 2015 12:50:14 +0100

x86: pmc_atom: don%27t check for NULL twice

debugfs_remove_recursive() is NULL-aware, thus, we may safely remove the check
here. There is no need to assing NULL to variable since it will be not used
anywhere.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Acked-by: Aubrey Li <aubrey.li@...ux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Kumar P. Mahesh <mahesh.kumar.p@...el.com>
Link: http://lkml.kernel.org/r/1421253575-22509-3-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/x86/kernel/pmc_atom.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c
index 8bb9a61..1dd6c62 100644
--- a/arch/x86/kernel/pmc_atom.c
+++ b/arch/x86/kernel/pmc_atom.c
@@ -202,11 +202,7 @@ static const struct file_operations pmc_sleep_tmr_ops = {
 
 static void pmc_dbgfs_unregister(struct pmc_dev *pmc)
 {
-	if (!pmc->dbgfs_dir)
-		return;
-
 	debugfs_remove_recursive(pmc->dbgfs_dir);
-	pmc->dbgfs_dir = NULL;
 }
 
 static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev)
--
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