[PATCH V4] clk: add a fixed factor clock
Mike Turquette
mturquette at ti.com
Sun May 6 21:42:41 EDT 2012
On 20120503-19:11, viresh kumar wrote:
> On May 3, 2012 5:38 PM, "Sascha Hauer" <s.hauer at pengutronix.de> wrote:
> >
>
> > > + if (clk)
> > > + return clk;
> >
> > if (!IS_ERR(clk))
>
> Oops. @Mike: can you please fix it while applying?
I've applied the below fix in my local branch. Let me know if you have
issue with it before I send out my pull request to Arnd.
Thanks,
Mike
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 0e8782b..1f2da01 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -88,10 +88,8 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
clk = clk_register(dev, &fix->hw);
- if (clk)
- return clk;
+ if (IS_ERR(clk))
+ kfree(fix);
- kfree(fix);
-
- return NULL;
+ return clk;
}
More information about the linux-arm-kernel
mailing list