pinctrl: stmfx: Fix 'warn: bitwise AND condition is false here'
authorLee Jones <lee.jones@linaro.org>
Mon, 13 May 2019 06:38:04 +0000 (07:38 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 13 May 2019 07:28:26 +0000 (08:28 +0100)
drivers/pinctrl/pinctrl-stmfx.c:441 stmfx_pinctrl_irq_set_type() warn: bitwise AND condition is false here

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/pinctrl/pinctrl-stmfx.c

index 074c8fa3e75c8f16084aadb33ec09d4575a81705..eba872ce4a7cb2bac51fb345735551cc49d82c6c 100644 (file)
@@ -437,7 +437,7 @@ static int stmfx_pinctrl_irq_set_type(struct irq_data *data, unsigned int type)
        u32 reg = get_reg(data->hwirq);
        u32 mask = get_mask(data->hwirq);
 
-       if (type & IRQ_TYPE_NONE)
+       if (type == IRQ_TYPE_NONE)
                return -EINVAL;
 
        if (type & IRQ_TYPE_EDGE_BOTH) {