mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
d0511b5496
commit
54515257ca
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue