usb: gadget: f_gsi: Fix return type for name_to_prot_id()
name_to_prot_id() returns -EINVAL for error case when return
type is enum usb_prot_id. This return type is compared against
< 0 without type casting to integer which returns false. As a
result invalid prot_id is indexed for __gsi array. Fix the issue
by changing return type to int.
Change-Id: I0d833d59e95e2257255e841913a2eed5204c6ef5
Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment