[PATCH] regulator: qcom-labibb: use the platform device in dev_err_probe()

From: Cong Nguyen

Date: Sat Nov 28 2026 - 11:40:48 EST


When the short-circuit interrupt cannot be found, the probe loop calls
dev_err_probe() with vreg->dev. vreg->dev is only set a few lines further
down, so at this point it is still NULL.

If of_irq_get_byname() returned -EPROBE_DEFER, dev_err_probe() passes the
device to device_set_deferred_probe_reason(), which calls
dev_driver_string() on it.

Pass the platform device, which probe already has in dev.

Fixes: 390af53e0411 ("regulator: qcom-labibb: Implement short-circuit and over-current IRQs")
Signed-off-by: Cong Nguyen <congnt264@xxxxxxxxx>
---
drivers/regulator/qcom-labibb-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom-labibb-regulator.c b/drivers/regulator/qcom-labibb-regulator.c
index 8641e69b55c3..83fb6f70e3ed 100644
--- a/drivers/regulator/qcom-labibb-regulator.c
+++ b/drivers/regulator/qcom-labibb-regulator.c
@@ -821,7 +821,7 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev)
irq = -EINVAL;

of_node_put(reg_node);
- return dev_err_probe(vreg->dev, irq,
+ return dev_err_probe(dev, irq,
"Short-circuit irq not found.\n");
}
vreg->sc_irq = irq;
--
2.25.1