Fix mpc52xx_psc_spi_do_remove() use of drvdata after spi master
unregister.

Signed-off-by: Dragos Carp <[EMAIL PROTECTED]>
---

 mpc52xx_psc_spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/mpc52xx_psc_spi.c
b/drivers/spi/mpc52xx_psc_spi.c
index 7051e6c..a4463ba 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -534,10 +534,10 @@ static int __exit mpc52xx_psc_spi_do_remove(struct
device *dev)
 
        flush_workqueue(mps->workqueue);
        destroy_workqueue(mps->workqueue);
-       spi_unregister_master(master);
        free_irq(mps->irq, mps);
        if (mps->psc)
                iounmap(mps->psc);
+       spi_unregister_master(master);
 
        return 0;
 }



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to