* [PATCH] clk: sunxi: Fix checking return value of clk_register_[composite|factors]
@ 2013-07-12 8:15 Axel Lin
2013-07-15 13:42 ` Maxime Ripard
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2013-07-12 8:15 UTC (permalink / raw)
To: linux-arm-kernel
clk_register_composite() and clk_register_factors() return ERR_PTR on error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/clk/sunxi/clk-sunxi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 412912b..02e440b 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -64,7 +64,7 @@ static void __init sunxi_osc_clk_setup(struct device_node *node)
&gate->hw, &clk_gate_ops,
CLK_IS_ROOT);
- if (clk) {
+ if (!IS_ERR(clk)) {
of_clk_add_provider(node, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, clk_name, NULL);
}
@@ -221,7 +221,7 @@ static void __init sunxi_factors_clk_setup(struct device_node *node,
clk = clk_register_factors(NULL, clk_name, parent, 0, reg,
data->table, data->getter, &clk_lock);
- if (clk) {
+ if (!IS_ERR(clk)) {
of_clk_add_provider(node, of_clk_src_simple_get, clk);
clk_register_clkdev(clk, clk_name, NULL);
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] clk: sunxi: Fix checking return value of clk_register_[composite|factors]
2013-07-12 8:15 [PATCH] clk: sunxi: Fix checking return value of clk_register_[composite|factors] Axel Lin
@ 2013-07-15 13:42 ` Maxime Ripard
2013-08-05 19:07 ` Mike Turquette
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2013-07-15 13:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi Axel,
On Fri, Jul 12, 2013 at 04:15:15PM +0800, Axel Lin wrote:
> clk_register_composite() and clk_register_factors() return ERR_PTR on error.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Thanks for this patch!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130715/24106ae7/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] clk: sunxi: Fix checking return value of clk_register_[composite|factors]
2013-07-15 13:42 ` Maxime Ripard
@ 2013-08-05 19:07 ` Mike Turquette
0 siblings, 0 replies; 3+ messages in thread
From: Mike Turquette @ 2013-08-05 19:07 UTC (permalink / raw)
To: linux-arm-kernel
Quoting Maxime Ripard (2013-07-15 06:42:35)
> Hi Axel,
>
>
> On Fri, Jul 12, 2013 at 04:15:15PM +0800, Axel Lin wrote:
> > clk_register_composite() and clk_register_factors() return ERR_PTR on error.
> >
> > Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Taken into clk-next.
Thanks!
Mike
>
> Thanks for this patch!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-05 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 8:15 [PATCH] clk: sunxi: Fix checking return value of clk_register_[composite|factors] Axel Lin
2013-07-15 13:42 ` Maxime Ripard
2013-08-05 19:07 ` Mike Turquette
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).