[PATCH] pinctrl: rockchip: use *enum* properly in rockchip_pinconf_pull_valid()

Sergey Shtylyov s.shtylyov at auroraos.dev
Mon Feb 23 12:03:32 PST 2026


On 2/23/26 10:44 PM, Sergey Shtylyov wrote:

> 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>
[...]

   Forgot to add that the patch wass against the for-next branch of Linus W.'s
linux-pinctrl.git repo.

MBR, Sergey




More information about the Linux-rockchip mailing list