[PATCH] pinctrl: rockchip: use *enum* properly in rockchip_pinconf_pull_valid()
Sergey Shtylyov
s.shtylyov at auroraos.dev
Mon Feb 23 11:44:23 PST 2026
In rockchip_pinconf_pull_valid(), the pull parameter has *enum* type that
is not isomorphic with boolean type but it's used as a boolean expression
in the ?: operator. Compare pull with PIN_CONFIG_BIAS_BUS_HOLD instead,
dropping the unnecessary ?: operator as well...
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov at auroraos.dev>
---
drivers/pinctrl/pinctrl-rockchip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 816823403e97..6d0ba2a258d1 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3577,7 +3577,7 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl,
return (pull == PIN_CONFIG_BIAS_PULL_PIN_DEFAULT ||
pull == PIN_CONFIG_BIAS_DISABLE);
case RK3066B:
- return pull ? false : true;
+ return pull == PIN_CONFIG_BIAS_BUS_HOLD;
case PX30:
case RV1108:
case RV1126:
--
2.53.0
More information about the linux-arm-kernel
mailing list