diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-03-26 13:34:02 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2025-04-25 10:15:24 +0200 |
commit | a5b18fd769b7dc2e77a9e6a390844cbf50626ae8 (patch) | |
tree | 7164851554f40c707be01d492dd6179b5f92f6cf | |
parent | 0c1ab3ce0492a579cf8c3b7c0a6c6ab05e47b4bb (diff) |
media: ti: cal: Fix wrong goto on error path
If pm_runtime_resume_and_get() fails, we should unprepare the context,
but currently we skip that as we goto to a later line.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | drivers/media/platform/ti/cal/cal-video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/ti/cal/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c index 4eb77f46f0304..29c38bf8d7a1a 100644 --- a/drivers/media/platform/ti/cal/cal-video.c +++ b/drivers/media/platform/ti/cal/cal-video.c @@ -744,7 +744,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) ret = pm_runtime_resume_and_get(ctx->cal->dev); if (ret < 0) - goto error_pipeline; + goto error_unprepare; cal_ctx_set_dma_addr(ctx, addr); cal_ctx_start(ctx); @@ -761,8 +761,8 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) error_stop: cal_ctx_stop(ctx); pm_runtime_put_sync(ctx->cal->dev); +error_unprepare: cal_ctx_unprepare(ctx); - error_pipeline: video_device_pipeline_stop(&ctx->vdev); error_release_buffers: |