This is a note to let you know that I've just added the patch titled

    x86: pmc-atom: Assign debugfs node as soon as possible

to the 3.18-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-pmc-atom-assign-debugfs-node-as-soon-as-possible.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 1b43d7125f3b6f7d46e72da64f65f3187a83b66b Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <[email protected]>
Date: Wed, 14 Jan 2015 18:39:31 +0200
Subject: x86: pmc-atom: Assign debugfs node as soon as possible

From: Andy Shevchenko <[email protected]>

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 <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Aubrey Li <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Kumar P. Mahesh <[email protected]>
Link: 
http://lkml.kernel.org/r/1421253575-22509-2-git-send-email-andriy.shevche...@linux.intel.com
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/x86/kernel/pmc_atom.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/pmc_atom.c
+++ b/arch/x86/kernel/pmc_atom.c
@@ -217,6 +217,8 @@ static int pmc_dbgfs_register(struct pmc
        if (!dir)
                return -ENOMEM;
 
+       pmc->dbgfs_dir = dir;
+
        f = debugfs_create_file("dev_state", S_IFREG | S_IRUGO,
                                dir, pmc, &pmc_dev_state_ops);
        if (!f) {
@@ -229,7 +231,7 @@ static int pmc_dbgfs_register(struct pmc
                dev_err(&pdev->dev, "sleep_state register failed\n");
                goto err;
        }
-       pmc->dbgfs_dir = dir;
+
        return 0;
 err:
        pmc_dbgfs_unregister(pmc);


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.18/x86-pmc-atom-assign-debugfs-node-as-soon-as-possible.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to