spi: Drop io_mutex in error paths

A couple of error paths were missing drops of io_mutex.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Mark Brown 2016-08-09 17:45:33 +01:00
parent 29b4817d40
commit 764f21665a
1 changed files with 2 additions and 0 deletions

View File

@ -1159,6 +1159,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread)
if (ret < 0) {
dev_err(&master->dev, "Failed to power device: %d\n",
ret);
mutex_unlock(&master->io_mutex);
return;
}
}
@ -1174,6 +1175,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread)
if (master->auto_runtime_pm)
pm_runtime_put(master->dev.parent);
mutex_unlock(&master->io_mutex);
return;
}
}