Skip to contentSkip to conversation

pinctrl: ti: fix error return code of ti_iodelay_probe()

PATCH In review Jia-Ju Bai 2 participants 2 messages Mar 6, 2021 – Mar 15, 2021

Subsystems (2)
lore
Share & tools
lore

Jia-Ju Bai

author
#0 lore raw

PATCH 1/1 pinctrl: ti: fix error return code of ti_iodelay_probe()

When ti_iodelay_pinconf_init_dev() fails, no error return code of ti_iodelay_probe() is assigned.
To fix this bug, ret is assigned with the return value of ti_iodelay_pinconf_init_dev(), and then ret is checked.

---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/ti/pinctrl-ti-iodelay.c +2 -1
index 60a67139ff0a..e5848269175a 100644
@@ -867,7 +867,8 @@ static int ti_iodelay_probe(struct platform_device *pdev)
 		goto exit_out;
 	}
 
-	if (ti_iodelay_pinconf_init_dev(iod))
+	ret = ti_iodelay_pinconf_init_dev(iod);
+	if (ret)
 		goto exit_out;
 
 	ret = ti_iodelay_alloc_pins(dev, iod, res->start);
Signature · 1 line
2.17.1