Commit a1317e1c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c fix from Wolfram Sang:

 - designware: cleanup properly on probe failure

* tag 'i2c-for-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
parents 172a9d94 6c72fc56
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -278,10 +278,12 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,

	if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
		dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
		if (IS_ERR(dev->slave))
		if (IS_ERR(dev->slave)) {
			i2c_del_adapter(&dev->adapter);
			return dev_err_probe(device, PTR_ERR(dev->slave),
					     "register UCSI failed\n");
		}
	}

	pm_runtime_set_autosuspend_delay(device, 1000);
	pm_runtime_use_autosuspend(device);