diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2019-04-13 20:24:13 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-02 10:37:51 +0900 |
commit | c9ba7a16d0f1d2b1e70d47296eca5f612c753825 (patch) | |
tree | 2312ac0a1a8265a6d53a1e7716f4cad98f3bc784 /drivers | |
parent | 4d1841d64535d60a1378d847cf4cd3f340ea28c2 (diff) |
spi: Release spi_res after finalizing message
spi_split_transfers_maxsize() can be used to split a transfer. This
function uses spi_res to lifetime manage the added transfer structures.
So in order to finalize the current message while it contains the split
transfers, spi_res_release() must be called after finalizing.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 3c6c6101b611..2195fa265aef 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1181,10 +1181,10 @@ out: if (msg->status && ctlr->handle_err) ctlr->handle_err(ctlr, msg); - spi_res_release(ctlr, msg); - spi_finalize_current_message(ctlr); + spi_res_release(ctlr, msg); + return ret; } |