Skip to content
Snippets Groups Projects
Commit ddd025bb authored by Andrew Murray's avatar Andrew Murray Committed by Tom Rini
Browse files

usb: Fix error handling in musb_hcd.c


The wait_until_[rx|tx]ep_ready functions return a u8 to indicate success
containing the value 0, 1 or -1. This patch changes the return type to an
int to accommodate the negative return values.

These functions are used in the file using calls such as if (!wait_until...
Where a -1 is returned it is mishandled and treated as success instead of
a CRC error. This patch addresses this.

Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: default avatarAndrew Murray <amurray@embedded-bits.co.uk>
Acked-by: default avatarMarek Vasut <marex@denx.de>
parent 6478cde6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment