diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 17a1853c6c2f..f43b4e11647a 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -665,6 +665,9 @@ static int i2c_device_remove(struct device *dev) status = driver->remove(client); } + if (dev->of_node) + irq_dispose_mapping(client->irq); + dev_pm_domain_detach(&client->dev, true); return status; }