Re: [PATCH] spmi: pmic-arb: Fix the driver data used by non-data commands

From: Konrad Dybcio

Date: Tue Nov 03 2026 - 04:30:17 EST


On 11/2/26 4:46 PM, Abel Vesa wrote:
> Since commit 02922ccbb330 ("spmi: pmic-arb: Register controller for bus
> instead of arbiter"), the driver data of each SPMI controller is a
> struct spmi_pmic_arb_bus, which points to the arbiter. pmic_arb_cmd()
> was not converted along with the other controller callbacks and still
> takes the driver data for the arbiter itself, so a non-data command
> reads ver_ops from the wrong structure and calls through a bogus
> pointer.
>
> No in-tree driver sends non-data commands at the moment, which is why
> this has gone unnoticed, but spmi_command_reset() and friends are
> exported for any SPMI client to use.
>
> Get the arbiter through the bus, like the other callbacks do.
>
> Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/#/bug/linux-29e1d31a-8d20-42c9-a5b3-41a90553d799
> Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad