Re: [PATCH v2] power: supply: cros_usbpd-charger: bound the EC-reported port count

Sebastian Reichel <[email protected]> Mon, 20 Jul 2026 23:43:45 +0200
Newsgroups dev.linux.lists.chrome-platform,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm
Message-ID <[email protected]>
On Tue, 16 Jun 2026 23:59:45 -0500, Bryam Vargas wrote:
> cros_usbpd_charger_probe() reads two port counts from the EC and uses
> one of them, num_charger_ports, as the loop bound when populating a
> fixed-size array:
> 
> 	struct port_data *ports[EC_USB_PD_MAX_PORTS];	/* 8 entries */
> 	...
> 	for (i = 0; i < charger->num_charger_ports; i++)
> 		charger->ports[charger->num_registered_psy++] = port;
> 
> [...]

Applied, thanks!

[1/1] power: supply: cros_usbpd-charger: bound the EC-reported port count
      commit: 90610021a9e92ab2b81979e3d474ca64bc31bf90

Best regards,
-- 
Sebastian Reichel <[email protected]>