From 0c89b3257b04950b4d66e9739af3e50bf93c74de Mon Sep 17 00:00:00 2001 From: Ruan Jinjie Date: Tue, 1 Aug 2023 10:53:28 +0800 Subject: [PATCH] i2c: mux: ltc4306: Remove an unnecessary ternary operator The true or false judgement of the ternary operator is unnecessary in C language semantics. So remove it to clean Code. Signed-off-by: Ruan Jinjie Acked-by: Andi Shyti Link: https://lore.kernel.org/r/20230801025328.3380963-1-ruanjinjie@huawei.com Signed-off-by: Andi Shyti --- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c index 5a03031519bee..637e25506490d 100644 --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c @@ -62,7 +62,7 @@ static const struct chip_desc chips[] = { static bool ltc4306_is_volatile_reg(struct device *dev, unsigned int reg) { - return (reg == LTC_REG_CONFIG) ? true : false; + return reg == LTC_REG_CONFIG; } static const struct regmap_config ltc4306_regmap_config = { -- 2.30.2