All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v2] media: smiapp: Fix runtime PM imbalance on error
@ 2020-05-25  8:19 Dinghao Liu
  0 siblings, 0 replies; only message in thread
From: Dinghao Liu @ 2020-05-25  8:19 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Sakari Ailus, Mauro Carvalho Chehab, linux-media, linux-kernel

When v4l2_async_register_subdev_sensor_common() returns
an error code, a pairing runtime PM usage counter
decrement is needed to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---

Changelog:

v2: - Use pm_runtime_put_noidle() insead of
      pm_runtime_put_autosuspend().
---
 drivers/media/i2c/smiapp/smiapp-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 5e4f6a2ef78e..0a8d27481bd1 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -3103,6 +3103,7 @@ static int smiapp_probe(struct i2c_client *client)
 	return 0;
 
 out_disable_runtime_pm:
+	pm_runtime_put_noidle(&client->dev);
 	pm_runtime_disable(&client->dev);
 
 out_media_entity_cleanup:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-25  8:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  8:19 [PATCH] [v2] media: smiapp: Fix runtime PM imbalance on error Dinghao Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.