diff options
author | Mark Brown <broonie@kernel.org> | 2016-08-09 12:45:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-09 12:45:33 -0400 |
commit | 764f21665a12e99f03124b4c8de722cdbff92213 (patch) | |
tree | 36fe8040e861bbd43ae060a87d607e4de48c8ae5 /drivers/spi/spi.c | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
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>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 51ad42fad567..57179d5eea9a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -1159,6 +1159,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) | |||
1159 | if (ret < 0) { | 1159 | if (ret < 0) { |
1160 | dev_err(&master->dev, "Failed to power device: %d\n", | 1160 | dev_err(&master->dev, "Failed to power device: %d\n", |
1161 | ret); | 1161 | ret); |
1162 | mutex_unlock(&master->io_mutex); | ||
1162 | return; | 1163 | return; |
1163 | } | 1164 | } |
1164 | } | 1165 | } |
@@ -1174,6 +1175,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) | |||
1174 | 1175 | ||
1175 | if (master->auto_runtime_pm) | 1176 | if (master->auto_runtime_pm) |
1176 | pm_runtime_put(master->dev.parent); | 1177 | pm_runtime_put(master->dev.parent); |
1178 | mutex_unlock(&master->io_mutex); | ||
1177 | return; | 1179 | return; |
1178 | } | 1180 | } |
1179 | } | 1181 | } |