Re: [PATCH v6 2/4] firmware: arm_scmi: Fix scmi_protocol_table_register() error handling
From: Abel Vesa
Date: Sat Sep 12 2026 - 16:51:15 EST
On 26-09-11 17:23:27, Hans de Goede wrote:
> scmi_protocol_table_register() stops at the first failure to request
> one of the scmi_device_id-s into scmi_requested_devices, but it leaves any
> previously successfully requested device-ids in place.
>
> Unrequest any successfully requested device-ids on error to fix this.
>
> The code manually unrequests these rather then calling
> scmi_protocol_table_unregister() because one way this can fail is because
> of duplicate device-ids and in that case the original device-id must not
> be unrequested.
>
> This also moves scmi_protocol_table_register() to below
> scmi_protocol_device_unrequest() since it now calls that local function.
>
> Fixes: 2858f6e5f064 ("firmware: arm_scmi: Add multiple protocols registration support")
> Signed-off-by: Hans de Goede <johannes.goede@xxxxxxxxxxxxxxxx>
This was already done by the commit:
2224b622260b ("firmware: arm_scmi: Roll back partial protocol table registration")