mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
spi: Fix controller unregister order harder
Commitc7e41e1caasought to backport upstream commit84855678adto the 4.9-stable tree but erroneously inserted a line at the wrong place. Fix it. Fixes:c7e41e1caa("spi: Fix controller unregister order") Reported-by: yangerkun <yangerkun@huawei.com> Signed-off-by: Lukas Wunner <lukas@wunner.de>
This commit is contained in:
@@ -2025,13 +2025,13 @@ static int __unregister(struct device *dev, void *null)
|
||||
*/
|
||||
void spi_unregister_master(struct spi_master *master)
|
||||
{
|
||||
device_for_each_child(&master->dev, NULL, __unregister);
|
||||
|
||||
if (master->queued) {
|
||||
if (spi_destroy_queue(master))
|
||||
dev_err(&master->dev, "queue remove failed\n");
|
||||
}
|
||||
|
||||
device_for_each_child(&master->dev, NULL, __unregister);
|
||||
|
||||
mutex_lock(&board_lock);
|
||||
list_del(&master->list);
|
||||
mutex_unlock(&board_lock);
|
||||
|
||||
Reference in New Issue
Block a user