summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2019-05-13 09:36:16 +0300
committerLee Jones <lee.jones@linaro.org>2019-05-13 10:28:20 +0300
commit28a853860f719a89774a28596e1d1fdf1cd4a611 (patch)
tree37f035dc19b43a38d8fb65475b4aa16b6b30468f /drivers
parent9af2de7657f5a52f9e15aebb6f9348f9b8f250a6 (diff)
downloadlinux-28a853860f719a89774a28596e1d1fdf1cd4a611.tar.xz
pinctrl: stmfx: Fix 'warn: unsigned <VAR> is never less than zero'
smatch warnings: drivers/pinctrl/pinctrl-stmfx.c:225 stmfx_pinconf_get() warn: unsigned 'dir' is never less than zero. drivers/pinctrl/pinctrl-stmfx.c:228 stmfx_pinconf_get() warn: unsigned 'type' is never less than zero. drivers/pinctrl/pinctrl-stmfx.c:231 stmfx_pinconf_get() warn: unsigned 'pupd' is never less than zero. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/pinctrl-stmfx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index bcd81269445e..074c8fa3e75c 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -213,9 +213,8 @@ static int stmfx_pinconf_get(struct pinctrl_dev *pctldev,
struct stmfx_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
u32 param = pinconf_to_config_param(*config);
struct pinctrl_gpio_range *range;
- u32 dir, type, pupd;
u32 arg = 0;
- int ret;
+ int ret, dir, type, pupd;
range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin);
if (!range)