mmc: mxs: Initialize the spinlock prior to using it
[pandora-kernel.git] / drivers / mmc / host / mxs-mmc.c
index f201bed..0c781ac 100644 (file)
@@ -752,12 +752,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, mmc);
 
+       spin_lock_init(&host->lock);
+
        ret = request_irq(host->irq, mxs_mmc_irq_handler, 0, DRIVER_NAME, host);
        if (ret)
                goto out_free_dma;
 
-       spin_lock_init(&host->lock);
-
        ret = mmc_add_host(mmc);
        if (ret)
                goto out_free_irq;