From: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> commit 0c8d604dea437b69a861479b413d629bc9b3da70 upstream. It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management") Cc: <stable@xxxxxxxxxxxxxxx> # v4.6+ Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-xiic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1337,8 +1337,8 @@ static int xiic_i2c_probe(struct platfor return 0; err_pm_disable: - pm_runtime_set_suspended(&pdev->dev); pm_runtime_disable(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); return ret; } Patches currently in stable-queue which might be from ruanjinjie@xxxxxxxxxx are queue-6.10/spi-spi-cadence-fix-missing-spi_controller_is_target.patch queue-6.10/bluetooth-btmrvl-use-irqf_no_autoen-flag-in-request_.patch queue-6.10/nfp-use-irqf_no_autoen-flag-in-request_irq.patch queue-6.10/static_call-handle-module-init-failure-correctly-in-.patch queue-6.10/spi-spi-cadence-fix-pm_runtime_set_suspended-with-ru.patch queue-6.10/i2c-xiic-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch queue-6.10/spi-spi-imx-fix-pm_runtime_set_suspended-with-runtim.patch queue-6.10/net-wwan-qcom_bam_dmux-fix-missing-pm_runtime_disabl.patch queue-6.10/spi-bcm63xx-fix-module-autoloading.patch queue-6.10/spi-bcm63xx-fix-missing-pm_runtime_disable.patch queue-6.10/net-ieee802154-mcr20a-use-irqf_no_autoen-flag-in-req.patch queue-6.10/i2c-qcom-geni-use-irqf_no_autoen-flag-in-request_irq.patch queue-6.10/ieee802154-fix-build-error.patch