]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: core: disable runtime PM on adapter registration failure
authorJohan Hovold <johan@kernel.org>
Mon, 11 May 2026 14:37:11 +0000 (16:37 +0200)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 30 May 2026 21:57:19 +0000 (23:57 +0200)
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>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-core-base.c

index 25d66de412872b0f96009287846b5291d5cc4207..fdf7d7d50f79b8bb22f01510656ed643510a275e 100644 (file)
@@ -1612,6 +1612,7 @@ out_reg:
        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);