Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not
called in error handling paths. Thus replace the jump target
"err_release_buffers" by "err_pm_putw".
Fixes: 152e0bf60219 ("media: stm32-dcmi: add power saving support")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
        if (ret < 0) {
                dev_err(dcmi->dev, "%s: Failed to start streaming, cannot get sync (%d)\n",
                        __func__, ret);
-               goto err_release_buffers;
+               goto err_pm_put;
        }
 
        ret = media_pipeline_start(&dcmi->vdev->entity, &dcmi->pipeline);
 
 err_pm_put:
        pm_runtime_put(dcmi->dev);
-
-err_release_buffers:
        spin_lock_irq(&dcmi->irqlock);
        /*
         * Return all buffers to vb2 in QUEUED state.