summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiao Yuanhong <liaoyuanhong@vivo.com>2025-08-26 17:52:43 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-09-04 11:37:05 +0300
commit9df928c90c109c97bdb565f81d3674224f3d118a (patch)
tree0f640f2ff692d197d5e57462c84cbbe35af89b06
parent73d50aa92f28ee8414fbfde011974fce970b82cc (diff)
downloadlinux-9df928c90c109c97bdb565f81d3674224f3d118a.tar.xz
media: chips-media: wave5: Remove redundant ternary operators
For ternary operators in the form of a ? true : false, if a itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 279f23e1304a..506d6c6166a6 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -543,7 +543,7 @@ static int wave5_vpu_enc_s_fmt_out(struct file *file, void *fh, struct v4l2_form
if (!info)
return -EINVAL;
- inst->cbcr_interleave = (info->comp_planes == 2) ? true : false;
+ inst->cbcr_interleave = info->comp_planes == 2;
switch (inst->src_fmt.pixelformat) {
case V4L2_PIX_FMT_NV21: