Skip to content

Commit

Permalink
clk: versatile: free icst on error return
Browse files Browse the repository at this point in the history
commit a183da6 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>
  • Loading branch information
Colin Ian King authored and Mike Turquette committed May 31, 2014
1 parent 9ec2749 commit ab7ad35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-icst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ab7ad35

Please sign in to comment.