Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 680c1305 authored by Axel Lin's avatar Axel Lin Committed by Grant Likely
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 0c4a1590
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -427,10 +427,10 @@ static int __devexit spi_sh_remove(struct platform_device *pdev)
{
{
	struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev);
	struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev);


	spi_unregister_master(ss->master);
	destroy_workqueue(ss->workqueue);
	destroy_workqueue(ss->workqueue);
	free_irq(ss->irq, ss);
	free_irq(ss->irq, ss);
	iounmap(ss->addr);
	iounmap(ss->addr);
	spi_master_put(ss->master);


	return 0;
	return 0;
}
}