Messages in this thread Patch in this message | | | Date | Thu, 22 Jun 2006 20:40:33 -0400 | From | Dave Jones <> | Subject | stv680 boolean logic bug. |
| |
This looks closer to what I believe the original intent was. (Also fixes line-len to meet CodingStyle)
Signed-off-by: Dave Jones <davej@redhat.com>
--- linux-2.6/drivers/media/video/stv680.c~ 2006-06-22 20:38:21.000000000 -0400 +++ linux-2.6/drivers/media/video/stv680.c 2006-06-22 20:39:02.000000000 -0400 @@ -974,7 +974,8 @@ static void bayer_unshuffle (struct usb_ frame->grabstate = FRAME_DONE; stv680->framecount++; stv680->readcount++; - if (stv680->frame[(stv680->curframe + 1) & (STV680_NUMFRAMES - 1)].grabstate == FRAME_READY) { + if (stv680->frame[(stv680->curframe + 1) && + (STV680_NUMFRAMES - 1)].grabstate == FRAME_READY) { stv680->curframe = (stv680->curframe + 1) & (STV680_NUMFRAMES - 1); } -- http://www.codemonkey.org.uk - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |