[3.11.y.z extended stable] Patch "clk: vexpress: NULL dereference on error path" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Fri Jun 6 15:05:04 UTC 2014
This is a note to let you know that I have just added a patch titled
clk: vexpress: NULL dereference on error path
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 9ac175ec67e8e56eb3627287067eccde3c21a9ab Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Thu, 7 Nov 2013 08:08:44 +0000
Subject: clk: vexpress: NULL dereference on error path
commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.
If the allocation fails then we dereference the NULL in the error path.
Just return directly.
Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Pawel Moll <pawel.moll at arm.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index 2dc8b41a339d..a535c7bf8574 100644
--- a/drivers/clk/versatile/clk-vexpress-osc.c
+++ b/drivers/clk/versatile/clk-vexpress-osc.c
@@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct device_node *node)
osc = kzalloc(sizeof(*osc), GFP_KERNEL);
if (!osc)
- goto error;
+ return;
osc->func = vexpress_config_func_get_by_node(node);
if (!osc->func) {
--
1.9.1
More information about the kernel-team
mailing list