summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2022-05-03 10:44:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-09 10:22:58 +0200
commit1207ddc93b9efb3efe8c3c464df79e0e8f07d84e (patch)
tree19e8f4760f753fe87450a1df72a397d198474f02 /drivers/media
parenta4cd52464bf2bd9b0cbc3fca910dac446f920ab8 (diff)
media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check
[ Upstream commit 91f49b80983f7bffdea9498209b2b896231ac776 ] While this does not happen in production, this check should be done versus the mask, as checking with the YCYC value may not include some bits that may be set. It is correct and safe to check the whole mask. Fixes: 123aaf816b95 ("media: atmel: atmel-sama5d2-isc: fix YUYV format") Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/atmel/atmel-sama5d2-isc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
index c8ed9315ef31..7421bc51709c 100644
--- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
+++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
@@ -267,7 +267,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc)
* Thus, if the YCYC mode is selected, replace it with the
* sama5d2-compliant mode which is YYCC .
*/
- if ((rlp_mode & ISC_RLP_CFG_MODE_YCYC) == ISC_RLP_CFG_MODE_YCYC) {
+ if ((rlp_mode & ISC_RLP_CFG_MODE_MASK) == ISC_RLP_CFG_MODE_YCYC) {
rlp_mode &= ~ISC_RLP_CFG_MODE_MASK;
rlp_mode |= ISC_RLP_CFG_MODE_YYCC;
}