diff options
author | Kaixu Xia <kaixuxia@tencent.com> | 2020-11-06 16:36:35 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-11-10 15:08:27 +0100 |
commit | 54515257ca3acc99e26117727874a7566148e64b (patch) | |
tree | 7fe714888e0190c9021b36a86b6ca76748352129 /drivers/pinctrl | |
parent | d0511b5496c03cdbcda55a9b57c32cdd751920ed (diff) |
pinctrl: ocelot: Remove unnecessary conversion to bool
Fix the following coccicheck warning:
./drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1604651795-1220-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-ocelot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index a4a1b00f7f0d..c2be5c44077f 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -729,7 +729,7 @@ static int ocelot_pinconf_get(struct pinctrl_dev *pctldev, if (err) return err; if (param == PIN_CONFIG_BIAS_DISABLE) - val = (val == 0 ? true : false); + val = (val == 0); else if (param == PIN_CONFIG_BIAS_PULL_DOWN) val = (val & BIAS_PD_BIT ? true : false); else /* PIN_CONFIG_BIAS_PULL_UP */ |