Calling pm_runtime_get_sync() at driver's removal time is not right, as this will resume PM runtime. This is clearly not what it is desired there, since it calls pm_runtime_set_suspended() afterwards. So, just remove pm runtime get/put logic from the device removal logic. Fixes: 8fcfc491c6ca ("media: mt9m001: switch s_power callback to runtime PM") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> --- drivers/media/i2c/mt9m001.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index 3b0ba8ed5233..ac1b380e6c03 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -834,14 +834,11 @@ static int mt9m001_remove(struct i2c_client *client) { struct mt9m001 *mt9m001 = to_mt9m001(client); - pm_runtime_get_sync(&client->dev); - v4l2_async_unregister_subdev(&mt9m001->subdev); media_entity_cleanup(&mt9m001->subdev.entity); pm_runtime_disable(&client->dev); pm_runtime_set_suspended(&client->dev); - pm_runtime_put_noidle(&client->dev); mt9m001_power_off(&client->dev); v4l2_ctrl_handler_free(&mt9m001->hdl); -- 2.30.2