Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()

The spin_lock_irqsave() macro is not nestable. The second call will
overwrite the first record of "flags" so the IRQs will not be enabled
correctly at the end of the function.

In the current code, this function is always called from the IRQ handler
so everything works fine and this fix doesn't change anything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Dan Carpenter and committed by
Mauro Carvalho Chehab
f7d40eea eaf95eee

+2 -2
+2 -2
drivers/staging/media/omap4iss/iss_video.c
··· 476 476 } 477 477 478 478 if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input != NULL) { 479 - spin_lock_irqsave(&pipe->lock, flags); 479 + spin_lock(&pipe->lock); 480 480 pipe->state &= ~ISS_PIPELINE_STREAM; 481 - spin_unlock_irqrestore(&pipe->lock, flags); 481 + spin_unlock(&pipe->lock); 482 482 } 483 483 484 484 buf = list_first_entry(&video->dmaqueue, struct iss_buffer,