Skip to content

Commit 5c18790

Browse files
committed
i2c: i801: Fix using mux_pdev before it's set
JIRA: https://issues.redhat.com/browse/RHEL-47426 commit 09f0290 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Sun Mar 3 11:45:22 2024 +0100 i2c: i801: Fix using mux_pdev before it's set i801_probe_optional_slaves() is called before i801_add_mux(). This results in mux_pdev being checked before it's set by i801_add_mux(). Fix this by changing the order of the calls. I consider this safe as I see no dependencies. Fixes: 80e56b8 ("i2c: i801: Simplify class-based client device instantiation") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 6cb31c9 commit 5c18790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-i801.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,9 +1756,9 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
17561756

17571757
i801_enable_host_notify(&priv->adapter);
17581758

1759-
i801_probe_optional_slaves(priv);
17601759
/* We ignore errors - multiplexing is optional */
17611760
i801_add_mux(priv);
1761+
i801_probe_optional_slaves(priv);
17621762

17631763
pci_set_drvdata(dev, priv);
17641764

0 commit comments

Comments
 (0)