linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] clk: vexpress: NULL dereference on error path
@ 2013-11-07  8:08 Dan Carpenter
  2013-11-08 12:42 ` Pawel Moll
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2013-11-07  8:08 UTC (permalink / raw)
  To: linux-arm-kernel

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@oracle.com>

diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index 2dc8b41..a535c7b 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) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-23 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  8:08 [patch] clk: vexpress: NULL dereference on error path Dan Carpenter
2013-11-08 12:42 ` Pawel Moll
2013-11-08 12:44   ` Pawel Moll
2014-04-11 11:51     ` Dan Carpenter
2014-04-11 11:57       ` Pawel Moll
2014-04-23 15:53         ` Pawel Moll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).