Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Liao Yuanhong and committed by
Hans Verkuil
32768975 843bce0f

+1 -1
+1 -1
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
··· 237 237 break; 238 238 } 239 239 240 - ret = (cnt >= detection_threshold) ? true : false; 240 + ret = cnt >= detection_threshold; 241 241 v4l2_dbg(3, debug, &hdmirx_dev->v4l2_dev, "%s: %d\n", __func__, ret); 242 242 243 243 return ret;