usb: pd: fix off-by-one in rdo_h_show
When viewing rdo_h via sysfs, the request type is determined by
looking up the type from the PDO list, however the obj_pos field
is 1-based whereas the received_pdos is 0-based. This off-by-one
error can result in misinterpretation of the request object, e.g.
viewing a PPS request may show the fields for a Fixed request.
Change-Id: If5f25cdadb7838b8f846ca90b16f8b17539d1e37
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment