lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/8] i2c: core: disable runtime PM on adapter registration failure
Date
Runtime PM is disabled by driver core when deregistering a device (and
on registration failure) but add an explicit disable to balance the
enable call when adapter registration fails for symmetry.

Fixes: 23a698fe65ec ("i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs")
Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/i2c/i2c-core-base.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 6f198d1325a6..31f7d43e4ab5 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1609,6 +1609,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
device_del(&adap->dev);
err_remove_debugfs:
debugfs_remove_recursive(adap->debugfs);
+ pm_runtime_disable(&adap->dev);
err_put_adap:
init_completion(&adap->dev_released);
put_device(&adap->dev);
--
2.53.0

\
 
 \ /
  Last update: 2026-05-05 16:35    [W:0.159 / U:8.329 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog