Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[firefly-linux-kernel-4.4.55.git] / drivers / crypto / bfin_crc.c
index a22f1a9f895f587b00662c7442258e161fcdc017..827913d7d33a5f21842d3cdfa59f7f8bc39339b1 100644 (file)
@@ -694,7 +694,7 @@ out_error_dma:
                dma_free_coherent(&pdev->dev, PAGE_SIZE, crc->sg_cpu, crc->sg_dma);
        free_dma(crc->dma_ch);
 out_error_irq:
-       free_irq(crc->irq, crc->dev);
+       free_irq(crc->irq, crc);
 out_error_unmap:
        iounmap((void *)crc->regs);
 out_error_free_mem:
@@ -720,10 +720,10 @@ static int bfin_crypto_crc_remove(struct platform_device *pdev)
 
        crypto_unregister_ahash(&algs);
        tasklet_kill(&crc->done_task);
-       iounmap((void *)crc->regs);
        free_dma(crc->dma_ch);
        if (crc->irq > 0)
-               free_irq(crc->irq, crc->dev);
+               free_irq(crc->irq, crc);
+       iounmap((void *)crc->regs);
        kfree(crc);
 
        return 0;