]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86: pmc-atom: Assign debugfs node as soon as possible
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 Jan 2015 16:39:31 +0000 (18:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:57:42 +0000 (14:57 -0800)
commitdb8b5886cf08a4890e920b1fae8cbf21608cfbcc
tree5bbf651f8487266fa671911b372f2124f51dffe8
parent58557add70dcae1dd7df1d039c99f27edc7f4ece
x86: pmc-atom: Assign debugfs node as soon as possible

commit 1b43d7125f3b6f7d46e72da64f65f3187a83b66b upstream.

pmc_dbgfs_unregister() will be called when pmc->dbgfs_dir is unconditionally
NULL on error path in pmc_dbgfs_register(). To prevent this we move the
assignment to where is should be.

Fixes: f855911c1f48 (x86/pmc_atom: Expose PMC device state and platform sleep state)
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: 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-2-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/pmc_atom.c