Skip to content

Commit ca89f73

Browse files
author
Wolfram Sang
committed
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: 50a5ba8 ("i2c: mux: demux-pinctrl: add driver") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
1 parent cefc479 commit ca89f73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/i2c/muxes/i2c-demux-pinctrl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
261261
pm_runtime_no_callbacks(&pdev->dev);
262262

263263
/* switch to first parent as active master */
264-
i2c_demux_activate_master(priv, 0);
264+
err = i2c_demux_activate_master(priv, 0);
265+
if (err)
266+
goto err_rollback;
265267

266268
err = device_create_file(&pdev->dev, &dev_attr_available_masters);
267269
if (err)

0 commit comments

Comments
 (0)