Commit 8102cf89 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: rkisp1: use pm_runtime_resume_and_get()



Commit dd8088d5 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
added pm_runtime_resume_and_get() in order to automatically handle
dev->power.usage_count decrement on errors.

Use the new API, in order to cleanup the error check logic.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent c311f533
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1003,9 +1003,8 @@ rkisp1_vb2_start_streaming(struct vb2_queue *queue, unsigned int count)
	if (ret)
		goto err_pipeline_stop;

	ret = pm_runtime_get_sync(cap->rkisp1->dev);
	ret = pm_runtime_resume_and_get(cap->rkisp1->dev);
	if (ret < 0) {
		pm_runtime_put_noidle(cap->rkisp1->dev);
		dev_err(cap->rkisp1->dev, "power up failed %d\n", ret);
		goto err_destroy_dummy;
	}