Skip to content
Commit e87c3f80 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Felipe Balbi
Browse files

usb: musb: Fix a few off-by-one lengths



!strncmp(buf, "force host", 9) is true if and only if buf starts with
"force hos". This was obviously not what was intended. The same error
exists for "force full-speed", "force high-speed" and "test
packet". Using strstarts avoids the error-prone hardcoding of the
prefix length.

For consistency, also change the other occurences of the !strncmp
idiom.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent b1d34783
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment