Thread (12 messages) 12 messages, 4 authors, 2015-02-04
STALE4189d

[PATCH v2] mmc: moxart: fix probe logic

From: arnd@arndb.de (Arnd Bergmann)
Date: 2015-02-02 14:58:49
Also in: linux-mmc

On Monday 02 February 2015 11:52:44 Jonas Jensen wrote:
On 29 January 2015 at 23:06, Arnd Bergmann [off-list ref] wrote:
quoted
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.

quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help