From: Gayatri Kammela Date: Thu, 27 Feb 2020 23:29:15 +0000 (-0800) Subject: platform/x86: intel_pmc_core: Remove duplicate 'if' to create debugfs entry X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=08ec5020bd6cf0102ec92c00ed149d8b76ace5ee;p=linux.git platform/x86: intel_pmc_core: Remove duplicate 'if' to create debugfs entry A debugfs entry for substate_live_status_registers is created only if the platform has sub-states, which requires the same condition to create substate_status_registers debugfs entry. Hence remove the redundant condition and re-use the existing one. Cc: Chen Zhou Cc: Andy Shevchenko Cc: David E. Box Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko --- diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c index 20b2f49726cf7..a36051c2a18c7 100644 --- a/drivers/platform/x86/intel_pmc_core.c +++ b/drivers/platform/x86/intel_pmc_core.c @@ -1108,9 +1108,6 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) debugfs_create_file("substate_status_registers", 0444, pmcdev->dbgfs_dir, pmcdev, &pmc_core_substate_sts_regs_fops); - } - - if (pmcdev->map->lpm_status_offset) { debugfs_create_file("substate_live_status_registers", 0444, pmcdev->dbgfs_dir, pmcdev, &pmc_core_substate_l_sts_regs_fops);