summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiao Yuanhong <liaoyuanhong@vivo.com>2025-08-26 17:50:56 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-10-14 16:07:36 +0300
commit32768975e9b67169c62a0a9bfbd4eeec98d0b8ea (patch)
treedb4c3189854678bf6dfa0fa5a3a0222e94c873f8
parent843bce0fd189c592fe8b466116b1df847447b586 (diff)
downloadlinux-32768975e9b67169c62a0a9bfbd4eeec98d0b8ea.tar.xz
media: synopsys: hdmirx: media: 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> Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
index b7d278b3889f..c3007e09bc9f 100644
--- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -237,7 +237,7 @@ static bool tx_5v_power_present(struct snps_hdmirx_dev *hdmirx_dev)
break;
}
- ret = (cnt >= detection_threshold) ? true : false;
+ ret = cnt >= detection_threshold;
v4l2_dbg(3, debug, &hdmirx_dev->v4l2_dev, "%s: %d\n", __func__, ret);
return ret;