Skip to content

Commit 09f0290

Browse files
hkallweitWolfram Sang
authored andcommitted
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>
1 parent 90d35da commit 09f0290

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
@@ -1742,9 +1742,9 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
17421742

17431743
i801_enable_host_notify(&priv->adapter);
17441744

1745-
i801_probe_optional_slaves(priv);
17461745
/* We ignore errors - multiplexing is optional */
17471746
i801_add_mux(priv);
1747+
i801_probe_optional_slaves(priv);
17481748

17491749
pci_set_drvdata(dev, priv);
17501750

0 commit comments

Comments
 (0)