Commit 0a7bf530 authored by Enrico Scholz's avatar Enrico Scholz

media:mx6s_capture: fixed some error paths

Signed-off-by: Enrico Scholz's avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
parent 00fad5b2
......@@ -1087,6 +1087,13 @@ static int mx6s_start_streaming(struct vb2_queue *vq, unsigned int count)
if (rc < 0) {
spin_lock_irqsave(&csi_dev->slock, flags);
dma_free_coherent(csi_dev->v4l2_dev.dev,
csi_dev->discard_size,
csi_dev->discard_buffer,
csi_dev->discard_buffer_dma);
csi_dev->discard_buffer = NULL;
mx6s_release_bufs(&csi_dev->active_bufs, VB2_BUF_STATE_QUEUED);
mx6s_release_bufs(&csi_dev->capture, VB2_BUF_STATE_QUEUED);
......@@ -1349,6 +1356,7 @@ static int _mx6s_csi_open_init(struct mx6s_csi_dev *csi_dev)
if (ret < 0) {
v4l2_err(sd, "failed to power on device: %d\n", ret);
vb2_queue_release(&csi_dev->vb2_vidq);
pm_runtime_put(csi_dev->dev);
goto out;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment