[PATCH] regulator: ti-abb: drop unused ret assignments before skip_opt

From: Жамбакиев Радий Рикардинович

Date: Fri Sep 11 2026 - 06:50:32 EST


From: Radiy Zhambakiev <r.zhambakiev@xxxxxxxxxxxxxxxxx>

In ti_abb_probe(), the two 'ret = -ENODEV;' assignments that precede a
'goto skip_opt;' are dead stores. After the jump, ret is immediately
overwritten at the skip_opt label by of_property_read_u32(), so the
-ENODEV value is never read.

Drop the redundant assignments.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Radiy Zhambakiev <r.zhambakiev@xxxxxxxxxxxxxxxxx>
---
drivers/regulator/ti-abb-regulator.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c
index 04133510e5af..b77812b02147 100644
--- a/drivers/regulator/ti-abb-regulator.c
+++ b/drivers/regulator/ti-abb-regulator.c
@@ -751,7 +751,6 @@ static int ti_abb_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
if (!res) {
dev_dbg(dev, "Missing '%s' IO resource\n", pname);
- ret = -ENODEV;
goto skip_opt;
}

@@ -770,7 +769,6 @@ static int ti_abb_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname);
if (!res) {
dev_dbg(dev, "Missing '%s' IO resource\n", pname);
- ret = -ENODEV;
goto skip_opt;
}
abb->ldo_base = devm_ioremap_resource(dev, res);
--
2.53.0