diff options
author | Colin Ian King <colin.king@canonical.com> | 2014-04-12 19:59:14 +0200 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-05-31 02:07:46 +0200 |
commit | ab7ad35300f3810bca13993d1a6e100505c4af5b (patch) | |
tree | b906aa6176df5d7eec5fb6811b95c54afc7590b4 /drivers/clk/versatile | |
parent | clk: qcom: Return error pointers for unimplemented clocks (diff) | |
download | linux-ab7ad35300f3810bca13993d1a6e100505c4af5b.tar.xz linux-ab7ad35300f3810bca13993d1a6e100505c4af5b.zip |
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); } |