Re: [PATCH] regulator: qcom-labibb: print the real error when registration fails

From: Konrad Dybcio

Date: Mon Nov 30 2026 - 03:24:42 EST


On 11/28/26 5:40 PM, Cong Nguyen wrote:
> When devm_regulator_register() fails, the error message prints ret, but
> ret is not set from the registration result. It still holds 0 from the
> earlier regmap_read() or devm_request_threaded_irq() call, so the log
> says "error registering lab : 0" while probe returns the real error.
>
> Set ret from PTR_ERR() before the message and return it.
>
> Fixes: 498ab2fdf855 ("regulator: qcom: Add labibb driver")
> Signed-off-by: Cong Nguyen <congnt264@xxxxxxxxx>
> ---

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

Konrad