1 From d62b10483e89fbd3adc2cde272234ad5300d9a42 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Mon, 8 Oct 2018 18:26:15 +0100
4 Subject: [PATCH 265/703] staging: bcm2835-camera: Correct
5 V4L2_CID_COLORFX_CBCR behaviour
7 With V4L2_CID_COLORFX_CBCR calling ctrl_set_colfx it was incorrectly
8 assigning the colour values to the enable field of dev->colourfx
9 instead of the u and v fields.
11 Correct the assignments.
13 Reported as a Coverity issue
14 Detected by CoverityScan CID#1419711 ("Unused value")
16 Reported-by: Colin Ian King <colin.king@canonical.com>
17 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
19 drivers/staging/vc04_services/bcm2835-camera/controls.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
22 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
23 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
24 @@ -578,8 +578,8 @@ static int ctrl_set_colfx(struct bm2835_
26 control = &dev->component[COMP_CAMERA]->control;
28 - dev->colourfx.enable = (ctrl->val & 0xff00) >> 8;
29 - dev->colourfx.enable = ctrl->val & 0xff;
30 + dev->colourfx.u = (ctrl->val & 0xff00) >> 8;
31 + dev->colourfx.v = ctrl->val & 0xff;
33 ret = vchiq_mmal_port_parameter_set(dev->instance, control,
34 MMAL_PARAMETER_COLOUR_EFFECT,