]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
x86: pmc_atom: don%27t check for NULL twice
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 Jan 2015 16:39:32 +0000 (18:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 20 Jan 2015 11:50:14 +0000 (12:50 +0100)
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@linux.intel.com>
Acked-by: Aubrey 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.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/pmc_atom.c

index 8bb9a611ca2337c6a4a0a74776313256fe40cf88..1dd6c62d42eb04631245bb9971bea0e648b11b7c 100644 (file)
@@ -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)