diff options
author | Colin Ian King <colin.king@canonical.com> | 2014-04-12 18:59:14 +0100 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-05-30 17:07:46 -0700 |
commit | ab7ad35300f3810bca13993d1a6e100505c4af5b (patch) | |
tree | b906aa6176df5d7eec5fb6811b95c54afc7590b4 /drivers/clk/versatile | |
parent | 9ec2749bde1a5827beef5be64bfd5f24992f4ef3 (diff) | |
download | linux-ab7ad35300f3810bca13993d1a6e100505c4af5b.tar.bz2 |
clk: versatile: free icst on error return
commit a183da63 introduced a new error return path that does
not kfree icst if the kmemdup of desc->params fails.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/versatile')
-rw-r--r-- | drivers/clk/versatile/clk-icst.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 7f3868a227c8..bc96f103bd7c 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -140,6 +140,7 @@ struct clk *icst_clk_register(struct device *dev, pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL); if (!pclone) { + kfree(icst); pr_err("could not clone ICST params\n"); return ERR_PTR(-ENOMEM); } |