Commit bc751492 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

usb: typec: tcpm: Switch to use fwnode_property_count_uXX()

parent 41b57327
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4410,8 +4410,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port,
		goto sink;

	/* Get source pdos */
	ret = fwnode_property_read_u32_array(fwnode, "source-pdos",
					     NULL, 0);
	ret = fwnode_property_count_u32(fwnode, "source-pdos");
	if (ret <= 0)
		return -EINVAL;

@@ -4435,8 +4434,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port,
		return -EINVAL;
sink:
	/* Get sink pdos */
	ret = fwnode_property_read_u32_array(fwnode, "sink-pdos",
					     NULL, 0);
	ret = fwnode_property_count_u32(fwnode, "sink-pdos");
	if (ret <= 0)
		return -EINVAL;