]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: atomisp: Stop pipeline on atomisp_css_start() failure
authorHans de Goede <hansg@kernel.org>
Fri, 4 Jul 2025 09:20:56 +0000 (11:20 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 8 Jul 2025 06:43:28 +0000 (08:43 +0200)
atomisp_start_streaming() starts the media pipeline before calling
atomisp_css_start(). On atomisp_css_start() failures stop the pipeline
before returning the error.

Signed-off-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20250505210008.152659-4-hdegoede@redhat.com
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c

index 491af67cc7a84dde3a2674dab62ec8166595818d..fecba2588e3839447ad1f17de387b5379e6de05e 100644 (file)
@@ -982,6 +982,7 @@ int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count)
        ret = atomisp_css_start(asd);
        if (ret) {
                atomisp_flush_video_pipe(pipe, VB2_BUF_STATE_QUEUED, true);
+               media_pipeline_stop(&asd->video_out.vdev.entity.pads[0]);
                goto out_unlock;
        }