clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
Subsystems (3)
PATCH 1/1 clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
From: Markus Elfring <[email protected]>
Date: Mon, 26 Feb 2024 13:10:37 +0100
Add a label so that a bit of exception handling can be better reused at the end of this function implementation.
--- drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/clk/mediatek/clk-mt8173-apmixedsys.c +3 -2
@@ -152,8 +152,8 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev) clk_data =mtk_alloc_clk_data (CLK_APMIXED_NR_CLK );if (IS_ERR_OR_NULL (clk_data)) { -iounmap (base); -return -ENOMEM ; + r = -ENOMEM ; + goto unmap_io; }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); free_clk_data:mtk_free_clk_data (clk_data); +unmap_io:iounmap (base);return r; }
--
2.43.2
Il 26/02/24 13:26, Markus Elfring ha scritto:
Quoted 7 lines
From: Markus Elfring <[email protected]>
Date: Mon, 26 Feb 2024 13:10:37 +0100Add 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 <[email protected]>
Quoting Markus Elfring (2024-02-26 04:26:26)
Quoted 8 lines
From: Markus Elfring <[email protected]>
Date: Mon, 26 Feb 2024 13:10:37 +0100Add 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 <[email protected]>---
Applied to clk-next