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:Harini Katakam <harinik@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com>
Loading
Please sign in to comment