[PATCH v2] mmc: moxart: fix probe logic
Arnd Bergmann
arnd at arndb.de
Mon Feb 2 06:58:49 PST 2015
On Monday 02 February 2015 11:52:44 Jonas Jensen wrote:
>
> On 29 January 2015 at 23:06, Arnd Bergmann <arnd at arndb.de> wrote:
> > Jonas Jensen wanted to submit a patch for these, but apparently
> > forgot about it. I stumbled over this symptom first:
>
> Sorry about this, I remember thinking about the changes but only made
> a mental note (which was lost over time). I was sidetracked with other
> changes and work.
>
>
> > @@ -586,10 +586,10 @@ static int moxart_probe(struct platform_device *pdev)
> > goto out;
> > }
> >
> > - clk = of_clk_get(node, 0);
> > - if (IS_ERR(clk)) {
> > + host->clk = of_clk_get(node, 0);
>
> host->clk is a NULL dereference at this point in probe() (log below).
>
> I moved the single line "host = mmc_priv(mmc);" to happen just before,
> and everything is working normally again.
Thanks a lot for testing, and finding the second embarrassing bug
in my patch!
Can you forward the patch you successfully tested with your
Signed-off-by?
Arnd
More information about the linux-arm-kernel
mailing list