Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8f7deb4e authored by Hemant Kumar's avatar Hemant Kumar
Browse files

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: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 18be522e
Loading
Loading
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