[media] coda: Use && instead of & for non-bitfield conditions
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 3 Mar 2017 12:12:47 +0000 (09:12 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 22 Mar 2017 13:06:24 +0000 (10:06 -0300)
streamon and streamoff are used as boolean values, not as bitfields.
Therefore, the logical && should be used to combine them.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/coda-common.c

index 85a8add36214abbe2d8017a81ecdbc6876352e22..ee9d4b81d6752cd49ff9195e1636407a5e0e9a7a 100644 (file)
@@ -1459,7 +1459,7 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count)
        }
 
        /* Don't start the coda unless both queues are on */
-       if (!(ctx->streamon_out & ctx->streamon_cap))
+       if (!(ctx->streamon_out && ctx->streamon_cap))
                return 0;
 
        q_data_dst = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);