summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2025-01-15 08:29:45 +0100
committerWolfram Sang <wsa+renesas@sang-engineering.com>2025-01-15 19:37:07 +0100
commitca89f73394daf92779ddaa37b42956f4953f3941 (patch)
tree2cc0d78d1a3594949d4840d78a90c01ce84afa3e /drivers
parenti2c: atr: Fix client detach (diff)
downloadlinux-ca89f73394daf92779ddaa37b42956f4953f3941.tar.xz
linux-ca89f73394daf92779ddaa37b42956f4953f3941.zip
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") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/muxes/i2c-demux-pinctrl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index dce18f763a09..b204e5a21ce6 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -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)