mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
Add a label so that a bit of exception handling can be better reused at the end of this function implementation. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Link: https://lore.kernel.org/r/6a64e7b3-b1ce-46c4-9c85-89f731aee592@web.de Reviewed-by: AngeloGiaocchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
7fcf1ef84f
commit
f40056a5b4
@ -152,8 +152,8 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
|
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
|
||||||
if (IS_ERR_OR_NULL(clk_data)) {
|
if (IS_ERR_OR_NULL(clk_data)) {
|
||||||
iounmap(base);
|
r = -ENOMEM;
|
||||||
return -ENOMEM;
|
goto unmap_io;
|
||||||
}
|
}
|
||||||
|
|
||||||
fhctl_parse_dt(fhctl_node, pllfhs, ARRAY_SIZE(pllfhs));
|
fhctl_parse_dt(fhctl_node, pllfhs, ARRAY_SIZE(pllfhs));
|
||||||
@ -188,6 +188,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
|
|||||||
ARRAY_SIZE(pllfhs), clk_data);
|
ARRAY_SIZE(pllfhs), clk_data);
|
||||||
free_clk_data:
|
free_clk_data:
|
||||||
mtk_free_clk_data(clk_data);
|
mtk_free_clk_data(clk_data);
|
||||||
|
unmap_io:
|
||||||
iounmap(base);
|
iounmap(base);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user