Re: [PATCH] OPP: ti: Fix ti_opp_supply_probe wrong return values

From: Viresh Kumar
Date: Thu Jun 06 2024 - 05:49:16 EST


On 06-06-24, 11:43, Primoz Fiser wrote:
> ti_opp_supply_probe
> -> dev_pm_opp_set_config_regulators
> -> dev_pm_opp_set_config (returns negative if error, otherwise >= 1)

Ah, I forgot about the token that is returned here. I think the driver
should be fixed properly once and for all here.

The token must be used to clean the module removal part. Else if you
try to insert this module, remove it, insert again, you will get some
errors as the resources aren't cleaned well.

So either provide a remove() callback to the driver, or use
devm_pm_opp_set_config() here.

--
viresh