Skip to content

Commit

Permalink
spi/spi_sh: use spi_unregister_master instead of spi_master_put in re…
Browse files Browse the repository at this point in the history
…move 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>
  • Loading branch information
Axel Lin authored and Grant Likely committed May 20, 2011
1 parent 0c4a159 commit 680c130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 680c130

Please sign in to comment.