* [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
@ 2024-02-26 12:26 Markus Elfring
2024-02-26 12:33 ` AngeloGioacchino Del Regno
2024-02-29 1:42 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Markus Elfring @ 2024-02-26 12:26 UTC (permalink / raw)
To: linux-clk, kernel-janitors, linux-arm-kernel, linux-mediatek,
Angelo Gioacchino Del Regno, Chen-Yu Tsai, Matthias Brugger,
Michael Turquette, Stephen Boyd, Uwe Kleine-König
Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
index 1bbb21ab1786..6cab483b8e1e 100644
--- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
2024-02-26 12:26 [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe() Markus Elfring
@ 2024-02-26 12:33 ` AngeloGioacchino Del Regno
2024-02-29 1:42 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26 12:33 UTC (permalink / raw)
To: Markus Elfring, linux-clk, kernel-janitors, linux-arm-kernel,
linux-mediatek, Chen-Yu Tsai, Matthias Brugger,
Michael Turquette, Stephen Boyd, Uwe Kleine-König
Cc: LKML
Il 26/02/24 13:26, Markus Elfring ha scritto:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: AngeloGiaocchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
2024-02-26 12:26 [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe() Markus Elfring
2024-02-26 12:33 ` AngeloGioacchino Del Regno
@ 2024-02-29 1:42 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2024-02-29 1:42 UTC (permalink / raw)
To: Angelo Gioacchino Del Regno, Chen-Yu Tsai, Markus Elfring,
Matthias Brugger, Michael Turquette, Uwe Kleine-König,
kernel-janitors, linux-arm-kernel, linux-clk, linux-mediatek
Cc: LKML
Quoting Markus Elfring (2024-02-26 04:26:26)
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-29 1:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 12:26 [PATCH] clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe() Markus Elfring
2024-02-26 12:33 ` AngeloGioacchino Del Regno
2024-02-29 1:42 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).