Commit 76fda21d authored by Harini Katakam's avatar Harini Katakam Committed by Michal Simek
Browse files

SPI: cadence: Use separate variables for status and length



In transfer one message, use separate variables for transfer and length
in transfer_one_message.
The start_transfer function returns number of bytes transferred or an
error status (a negative value).
So use "length" to store the return of this function.

If length != transfer length, then
check if length > 0 - in which case status should be -EMSGSIZE.
if length < 0, then the function returned error status which should
be reflected in status variable.

If the length is equal to transfer length, above loop wont be entered;
the length should be reflected in msg length and status should be set
to 0 for success.

Signed-off-by: default avatarHarini Katakam <harinik@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 02312e9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment