[PATCH] mx2_camera: use GFP_ATOMIC under spin lock.

From: Cyril Roelandt
Date: Mon Nov 19 2012 - 16:41:54 EST


Found using the following semantic patch:

<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>

Signed-off-by: Cyril Roelandt <tipecaml@xxxxxxxxx>
---
drivers/media/platform/soc_camera/mx2_camera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c
index e575ae8..516b3a3 100644
--- a/drivers/media/platform/soc_camera/mx2_camera.c
+++ b/drivers/media/platform/soc_camera/mx2_camera.c
@@ -909,7 +909,7 @@ static int mx2_start_streaming(struct vb2_queue *q, unsigned int count)
pcdev->discard_size = icd->user_height * bytesperline;
pcdev->discard_buffer = dma_alloc_coherent(ici->v4l2_dev.dev,
pcdev->discard_size, &pcdev->discard_buffer_dma,
- GFP_KERNEL);
+ GFP_ATOMIC);
if (!pcdev->discard_buffer)
return -ENOMEM;

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/