From: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> commit 316e74500d1c6589cba28cebe2864a0bceeb2396 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. Cc: stable@xxxxxxxxxxxxxxx Fixes: b50a64fc54af ("media: amphion: add amphion vpu device driver") Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/platform/amphion/vpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/platform/amphion/vpu_drv.c +++ b/drivers/media/platform/amphion/vpu_drv.c @@ -151,8 +151,8 @@ err_add_decoder: media_device_cleanup(&vpu->mdev); v4l2_device_unregister(&vpu->v4l2_dev); err_vpu_deinit: - pm_runtime_set_suspended(dev); pm_runtime_disable(dev); + pm_runtime_set_suspended(dev); return ret; } Patches currently in stable-queue which might be from ruanjinjie@xxxxxxxxxx are queue-6.12/kunit-string-stream-fix-a-uaf-bug-in-kunit_init_suite.patch queue-6.12/media-amphion-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch queue-6.12/media-gspca-ov534-ov772x-fix-off-by-one-error-in-set_frame_rate.patch queue-6.12/media-venus-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch queue-6.12/media-i2c-dw9768-fix-pm_runtime_set_suspended-with-runtime-pm-enabled.patch