clk: vexpress: NULL dereference on error path
Subsystems (4)
PATCH 1/1 clk: vexpress: NULL dereference on error path
If the allocation fails then we dereference the NULL in the error path. Just return directly.
drivers/clk/versatile/clk-vexpress-osc.c +1 -1
@@ -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) {
Quoted 11 lines · Dan Carpenter
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 <[email protected]>drivers/clk/versatile/clk-vexpress-osc.c +0
-0
drivers/clk/versatile/clk-vexpress-osc.c void __init vexpress_osc_of_setup(struct device_node *node) · line 108
Quoted 8 lines
drivers/clk/versatile/clk-vexpress-osc.c +1
-1@@ -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) {
Well spotted, thanks!
Will get it queued with other vexpress clk changes.
Paweł
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Pawel Moll
Acked-byQuoted 18 lines · Pawel Moll
Quoted 17 lines · Dan Carpenter
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 <[email protected]>drivers/clk/versatile/clk-vexpress-osc.c +1
-1@@ -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 ;
Quoted 6 lines
drivers/clk/versatile/clk-vexpress-osc.c void __init vexpress_osc_of_setup(struct device_node *node) · line 108
Quoted 2 lines
drivers/clk/versatile/clk-vexpress-osc.c +0
-0osc->func =vexpress_config_func_get_by_node (node);if (!osc->func) {Well spotted, thanks!
Will get it queued with other vexpress clk changes.
Having said that - Mike, it's a bug fix. If you can still get it into the current merge window, please do:
Paweł
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 24 lines · Pawel Moll
Quoted 23 lines · Pawel Moll
Quoted 11 lines · Dan Carpenter
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 <[email protected]>drivers/clk/versatile/clk-vexpress-osc.c +0
-0drivers/clk/versatile/clk-vexpress-osc.c void __init vexpress_osc_of_setup(struct device_node *node) · line 108
Quoted 8 lines
drivers/clk/versatile/clk-vexpress-osc.c +1
-1@@ -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) {Well spotted, thanks!
Quoted 7 lines
Quoted 1 line
Will get it queued with other vexpress clk changes.
Having said that - Mike, it's a bug fix. If you can still get it into the current merge window, please do:
Acked-by Pawel Moll <[email protected]>
Heh. Let's try again to get this merged. :P
regards,
dan carpenter
Quoted 27 lines · Dan Carpenter
Quoted 26 lines · Pawel Moll
Quoted 24 lines · Pawel Moll
Quoted 11 lines · Dan Carpenter
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 <[email protected]>drivers/clk/versatile/clk-vexpress-osc.c +0
-0drivers/clk/versatile/clk-vexpress-osc.c void __init vexpress_osc_of_setup(struct device_node *node) · line 108
Quoted 8 lines
drivers/clk/versatile/clk-vexpress-osc.c +1
-1@@ -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) {Well spotted, thanks!
Will get it queued with other vexpress clk changes.
Quoted 7 lines
Quoted 5 lines
Having said that - Mike, it's a bug fix. If you can still get it into the current merge window, please do:
Acked-by Pawel Moll <[email protected]>Heh. Let's try again to get this merged. :P
Right, my fault, haven't followed this up with Mike, sorry.
Pawel
Quoted 9 lines · Pawel Moll
Quoted 7 lines
Quoted 5 lines
Having said that - Mike, it's a bug fix. If you can still get it into the current merge window, please do:
Acked-by Pawel Moll <[email protected]>Heh. Let's try again to get this merged. :P
Right, my fault, haven't followed this up with Mike, sorry.
Mike, will you take it in as a fix for 3.15, or do you want me to queue it with other vexpress fixes and go through arm-soc?
Cheers!
Pawel