Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a8a8042 authored by Cyril Roelandt's avatar Cyril Roelandt Committed by Mauro Carvalho Chehab
Browse files

[media] mx2_camera: use GFP_ATOMIC under spin lock



Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>

Signed-off-by: default avatarCyril Roelandt <tipecaml@gmail.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent bc1ebd70
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -879,7 +879,7 @@ static int mx2_start_streaming(struct vb2_queue *q, unsigned int count)
		pcdev->discard_size = icd->user_height * bytesperline;
		pcdev->discard_size = icd->user_height * bytesperline;
		pcdev->discard_buffer = dma_alloc_coherent(ici->v4l2_dev.dev,
		pcdev->discard_buffer = dma_alloc_coherent(ici->v4l2_dev.dev,
				pcdev->discard_size, &pcdev->discard_buffer_dma,
				pcdev->discard_size, &pcdev->discard_buffer_dma,
				GFP_KERNEL);
				GFP_ATOMIC);
		if (!pcdev->discard_buffer) {
		if (!pcdev->discard_buffer) {
			spin_unlock_irqrestore(&pcdev->lock, flags);
			spin_unlock_irqrestore(&pcdev->lock, flags);
			return -ENOMEM;
			return -ENOMEM;