Skip to contentSkip to conversation

usb: typec: ucsi: Remove incorrect warning

PATCH New Heikki Krogerus 1 participant 1 message Sep 22, 2022

Subsystems (3)
lore
Share & tools
lore

Heikki Krogerus

author maintainer
#0 lore raw

PATCH 1/1 usb: typec: ucsi: Remove incorrect warning

Sink only devices do not have any source capabilities, so the driver should not warn about that. Also DRP (Dual Role Power) capable devices, such as USB Type-C docking stations, do not return any source capabilities unless they are plugged to a power supply themselves.

Fixes 1f4642b72be7 ("usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4")
---
 drivers/usb/typec/ucsi/ucsi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/usb/typec/ucsi/ucsi.c +0 -2
index 7f2624f427241..6364f0d467ea3 100644
@@ -588,8 +588,6 @@ static int ucsi_get_pdos(struct ucsi_connector *con, int is_partner,
 				num_pdos * sizeof(u32));
 	if (ret < 0 && ret != -ETIMEDOUT)
 		dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);
-	if (ret == 0 && offset == 0)
-		dev_warn(ucsi->dev, "UCSI_GET_PDOS returned 0 bytes\n");
 
 	return ret;
 }
Signature · 1 line
2.35.1