mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
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>
This commit is contained in:
parent
9ec2749bde
commit
ab7ad35300
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user