7d81cdfb024231ca7539e27488bdc3d1af5fd9c8
[openwrt/staging/xback.git] /
1 From 984a05a26dacc21487d4b0fef4296dd695f3e0d8 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Sat, 2 Jan 2021 10:51:58 +0000
4 Subject: [PATCH] staging/vc04-services/codec: Fix logical precedence
5 issue
6
7 Two issues identified with operator precedence in logical
8 expressions. Fix them.
9
10 https://github.com/raspberrypi/linux/issues/4040
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
18 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
19 @@ -908,7 +908,7 @@ static void op_buffer_cb(struct vchiq_mm
20 /* stream ended, or buffer being returned during disable. */
21 v4l2_dbg(2, debug, &ctx->dev->v4l2_dev, "%s: Empty buffer - flags %04x",
22 __func__, mmal_buf->mmal_flags);
23 - if (!mmal_buf->mmal_flags & MMAL_BUFFER_HEADER_FLAG_EOS) {
24 + if (!(mmal_buf->mmal_flags & MMAL_BUFFER_HEADER_FLAG_EOS)) {
25 vb2_buffer_done(&vb2->vb2_buf, VB2_BUF_STATE_ERROR);
26 if (!port->enabled)
27 complete(&ctx->frame_cmplt);
28 @@ -1135,7 +1135,7 @@ static int vidioc_try_fmt(struct bcm2835
29 if (f->fmt.pix_mp.height > MAX_H)
30 f->fmt.pix_mp.height = MAX_H;
31
32 - if (!fmt->flags & V4L2_FMT_FLAG_COMPRESSED) {
33 + if (!(fmt->flags & V4L2_FMT_FLAG_COMPRESSED)) {
34 /* Only clip min w/h on capture. Treat 0x0 as unknown. */
35 if (f->fmt.pix_mp.width < MIN_W)
36 f->fmt.pix_mp.width = MIN_W;