Skip to contentSkip to conversation

i2c: mux: demux-pinctrl: check initial mux selection, too

PATCH Applied Wolfram Sang 1 participant 2 messages Jan 15, 2025 – Jan 16, 2025

Subsystems (3)
lore
Share & tools
lore

Wolfram Sang

author maintainer
#0 lore raw

PATCH 1/1 i2c: mux: demux-pinctrl: check initial mux selection, too

When misconfigured, the initial setup of the current mux channel can fail, too. It must be checked as well.

Fixes 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")

---

Tested with a Renesas Lager board (R-Car H2).

 drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/i2c/muxes/i2c-demux-pinctrl.c +3 -1
index dce18f763a09..b204e5a21ce6 100644
@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
 	pm_runtime_no_callbacks(&pdev->dev);
 
 	/* switch to first parent as active master */
-	i2c_demux_activate_master(priv, 0);
+	err = i2c_demux_activate_master(priv, 0);
+	if (err)
+		goto err_rollback;
 
 	err = device_create_file(&pdev->dev, &dev_attr_available_masters);
 	if (err)
Signature · 1 line
2.39.2
author maintainer Applied
#1 lore raw
Quoted 5 lines · Wolfram Sang

When misconfigured, the initial setup of the current mux channel can fail, too. It must be checked as well.

Fixes 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")

Applied to for-current, thanks!