diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-05-11 13:27:00 (GMT) |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-05-20 06:43:07 (GMT) |
commit | 680c1305e259a488f489bc887854523b6c6e0705 (patch) | |
tree | ba5ded620005a6ff939838318b07b5060617e41a /drivers/spi/spi_sh.c | |
parent | 0c4a1590189b426814748d2e03b95541852b3af6 (diff) | |
download | linux-fsl-qoriq-680c1305e259a488f489bc887854523b6c6e0705.tar.xz |
spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path
spi_master_put() should only be used in error handling.
Once spi_register_master() returns success, we should call
spi_unregister_master() instead.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi_sh.c')
-rw-r--r-- | drivers/spi/spi_sh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_sh.c b/drivers/spi/spi_sh.c index 869a07d..9eedd71 100644 --- a/drivers/spi/spi_sh.c +++ b/drivers/spi/spi_sh.c @@ -427,10 +427,10 @@ static int __devexit spi_sh_remove(struct platform_device *pdev) { struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev); + spi_unregister_master(ss->master); destroy_workqueue(ss->workqueue); free_irq(ss->irq, ss); iounmap(ss->addr); - spi_master_put(ss->master); return 0; } |