]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 6 May 2020 19:21:00 +0000 (21:21 +0200)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Mon, 22 Jun 2020 20:22:23 +0000 (17:22 -0300)
BugLink: https://bugs.launchpad.net/bugs/1881178
[ Upstream commit e9d1a0a41d4486955e96552293c1fcf1fce61602 ]

A call to 'i2c_demux_deactivate_master()' is missing in the error handling
path, as already done in the remove function.

Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/i2c/muxes/i2c-demux-pinctrl.c

index 0e16490eb3a10bcaddc79c4e62c721e7cadf0b3d..5365199a31f419b9db442ba3fa555e3a3ed044fc 100644 (file)
@@ -272,6 +272,7 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
 err_rollback_available:
        device_remove_file(&pdev->dev, &dev_attr_available_masters);
 err_rollback:
+       i2c_demux_deactivate_master(priv);
        for (j = 0; j < i; j++) {
                of_node_put(priv->chan[j].parent_np);
                of_changeset_destroy(&priv->chan[j].chgset);