Commit c9ba7a16 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Mark Brown

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: default avatarNoralf Trønnes <noralf@tronnes.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4d1841d6
...@@ -1181,10 +1181,10 @@ static int spi_transfer_one_message(struct spi_controller *ctlr, ...@@ -1181,10 +1181,10 @@ static int spi_transfer_one_message(struct spi_controller *ctlr,
if (msg->status && ctlr->handle_err) if (msg->status && ctlr->handle_err)
ctlr->handle_err(ctlr, msg); ctlr->handle_err(ctlr, msg);
spi_res_release(ctlr, msg);
spi_finalize_current_message(ctlr); spi_finalize_current_message(ctlr);
spi_res_release(ctlr, msg);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment