[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1415812689-17326-3-git-send-email-andriy.shevchenko@linux.intel.com>
Date: Wed, 12 Nov 2014 19:18:08 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "H . Peter Anvin" <hpa@...ux.intel.com>, x86@...nel.org,
Aubrey Li <aubrey.li@...ux.intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
"Kumar P, Mahesh" <mahesh.kumar.p@...el.com>,
linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v4 2/3] x86: pmc_atom: don't 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>
---
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 19b8efa..bcc91ea 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)
--
2.1.3
--
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