提交 d5df8fe3 编写于 作者: A Andy Shevchenko 提交者: Thomas Gleixner

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: NAubrey Li <aubrey.li@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Kumar P. Mahesh <mahesh.kumar.p@intel.com>
Link: http://lkml.kernel.org/r/1421253575-22509-3-git-send-email-andriy.shevchenko@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 1b43d712
...@@ -202,11 +202,7 @@ static const struct file_operations pmc_sleep_tmr_ops = { ...@@ -202,11 +202,7 @@ static const struct file_operations pmc_sleep_tmr_ops = {
static void pmc_dbgfs_unregister(struct pmc_dev *pmc) static void pmc_dbgfs_unregister(struct pmc_dev *pmc)
{ {
if (!pmc->dbgfs_dir)
return;
debugfs_remove_recursive(pmc->dbgfs_dir); debugfs_remove_recursive(pmc->dbgfs_dir);
pmc->dbgfs_dir = NULL;
} }
static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev) static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册