diff options
| author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-01-15 08:29:45 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-23 17:22:54 +0100 |
| commit | 894076b78a7ee3d794f3f68c2af6d4910990a978 (patch) | |
| tree | f6a43491f0e800f12ea375df8e49a7e05af25cd0 /drivers | |
| parent | ec7329647fbf72e506038b57384fe0910e51151b (diff) | |
| download | linux-894076b78a7ee3d794f3f68c2af6d4910990a978.tar.gz linux-894076b78a7ee3d794f3f68c2af6d4910990a978.tar.bz2 linux-894076b78a7ee3d794f3f68c2af6d4910990a978.zip | |
i2c: mux: demux-pinctrl: check initial mux selection, too
[ Upstream commit ca89f73394daf92779ddaa37b42956f4953f3941 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 |
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 7e2686b606c0..cec7f3447e19 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) |
