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

Skip to content
Commit 248d723b authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Jack Pham
Browse files

usb: pd: Fix probe failure in case of no sink capablities passed



Commit b76105e359a7 ("usb: pd: Read sink capabilities from device
tree") added support in usbpd driver to pass sink capablities from
device tree. But it introduced bug in case of no sink capablities
passed from device tree as in this case, device_property_read_u32_array()
returns -EINVAL. Due to this, usbpd driver probe fails as usbpd_create()
returns errors. Fix this issue by checking if return value > 0 and then
only try to read sink capablities from device tree. If not, use default
sink capabliites defined in usbpd driver.

Change-Id: I51beeba282c6e067881c664d38c2657843a1c716
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent f6c02da8
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