pinctrl: stmfx: Fix 'warn: unsigned <VAR> is never less than zero'
authorLee Jones <lee.jones@linaro.org>
Mon, 13 May 2019 06:36:16 +0000 (07:36 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 13 May 2019 07:28:20 +0000 (08:28 +0100)
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>
drivers/pinctrl/pinctrl-stmfx.c

index bcd8126..074c8fa 100644 (file)
@@ -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)