Patch "ARM: cpuidle: Fix error return code" has been added to the 4.7-stable tree

From: <gregkh@linuxfoundation.org>
Date: 2016-10-14 09:59:02

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

    ARM: cpuidle: Fix error return code

to the 4.7-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:
     arm-cpuidle-fix-error-return-code.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let [off-list ref] know about it.

From af48d7bc3756a0cd882d65bff14ab39746ba57fe Mon Sep 17 00:00:00 2001
From: Christophe Jaillet <redacted>
Date: Thu, 11 Aug 2016 15:02:30 +0200
Subject: ARM: cpuidle: Fix error return code

From: Christophe Jaillet <redacted>

commit af48d7bc3756a0cd882d65bff14ab39746ba57fe upstream.

We know that 'ret = 0' because it has been tested a few lines above.
So, if 'kzalloc' fails, 0 will be returned instead of an error code.
Return -ENOMEM instead.

Fixes: a0d46a3dfdc3 ("ARM: cpuidle: Register per cpuidle device")
Signed-off-by: Christophe Jaillet <redacted>
Acked-by: Lorenzo Pieralisi <redacted>
Signed-off-by: Rafael J. Wysocki <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/cpuidle/cpuidle-arm.c |    1 +
 1 file changed, 1 insertion(+)
--- a/drivers/cpuidle/cpuidle-arm.c
+++ b/drivers/cpuidle/cpuidle-arm.c
@@ -135,6 +135,7 @@ static int __init arm_idle_init(void)
 		dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 		if (!dev) {
 			pr_err("Failed to allocate cpuidle device\n");
+			ret = -ENOMEM;
 			goto out_fail;
 		}
 		dev->cpu = cpu;

Patches currently in stable-queue which might be from christophe.jaillet@wanadoo.fr are

queue-4.7/arm-cpuidle-fix-error-return-code.patch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help