From: Liao Yuanhong Date: Tue, 26 Aug 2025 14:50:56 +0000 (+0800) Subject: media: synopsys: hdmirx: media: Remove redundant ternary operators X-Git-Tag: v6.19-rc1~159^2~239 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32768975e9b67169c62a0a9bfbd4eeec98d0b8ea;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Dmitry Osipenko Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c index b7d278b3889f2..c3007e09bc9f6 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;