diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-07 08:08:44 +0000 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-06-09 15:53:25 +0200 |
commit | 0d9757a0d82fc29f99bd8f84baa87d67941ec01b (patch) | |
tree | 8a0cb21ec02d4a1b92727a6d4da9173086aaf6fa /drivers/clk | |
parent | 0406b6fe7d5a89d1decfaa2d69552b9dd26cd700 (diff) |
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@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/versatile/clk-vexpress-osc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |