* [PATCH] ARM: mach-imx6q: Do not run error code path in success case
@ 2012-12-17 14:55 Fabio Estevam
2012-12-17 20:01 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2012-12-17 14:55 UTC (permalink / raw)
To: linux-arm-kernel
The 'put_clk' path should only run in the case of failure, so provide a 'return'
to avoid it running in the success case.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/mach-imx/mach-imx6q.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 4eb1b3a..61f50aa 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -134,6 +134,8 @@ static void __init imx6q_sabrelite_cko1_setup(void)
clk_set_parent(cko1_sel, ahb);
rate = clk_round_rate(cko1, 16000000);
clk_set_rate(cko1, rate);
+
+ return;
put_clk:
if (!IS_ERR(cko1_sel))
clk_put(cko1_sel);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: mach-imx6q: Do not run error code path in success case
2012-12-17 14:55 [PATCH] ARM: mach-imx6q: Do not run error code path in success case Fabio Estevam
@ 2012-12-17 20:01 ` Sascha Hauer
2012-12-17 20:08 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2012-12-17 20:01 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 17, 2012 at 12:55:47PM -0200, Fabio Estevam wrote:
> The 'put_clk' path should only run in the case of failure, so provide a 'return'
> to avoid it running in the success case.
Are you sure? It looks to me like it was intentional. The purpose of
this function is to set the parent/rate correctly. The references to
the clock are not needed later.
Sascha
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> arch/arm/mach-imx/mach-imx6q.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 4eb1b3a..61f50aa 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -134,6 +134,8 @@ static void __init imx6q_sabrelite_cko1_setup(void)
> clk_set_parent(cko1_sel, ahb);
> rate = clk_round_rate(cko1, 16000000);
> clk_set_rate(cko1, rate);
> +
> + return;
> put_clk:
> if (!IS_ERR(cko1_sel))
> clk_put(cko1_sel);
> --
> 1.7.9.5
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: mach-imx6q: Do not run error code path in success case
2012-12-17 20:01 ` Sascha Hauer
@ 2012-12-17 20:08 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2012-12-17 20:08 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 17, 2012 at 6:01 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Are you sure? It looks to me like it was intentional. The purpose of
> this function is to set the parent/rate correctly. The references to
> the clock are not needed later.
You are right, please disregard this patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-17 20:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 14:55 [PATCH] ARM: mach-imx6q: Do not run error code path in success case Fabio Estevam
2012-12-17 20:01 ` Sascha Hauer
2012-12-17 20:08 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox