diff mbox series

[2/2] pinctrl: stmfx: Fix 'warn: bitwise AND condition is false here'

Message ID 20190513073429.12023-2-lee.jones@linaro.org
State Accepted
Commit d17ed797b8fd5c8765cd959ac44aaa2f090f5a89
Headers show
Series [1/2] pinctrl: stmfx: Fix 'warn: unsigned <VAR> is never less than zero' | expand

Commit Message

Lee Jones May 13, 2019, 7:34 a.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Linus Walleij May 13, 2019, 8:18 a.m. UTC | #1
On Mon, May 13, 2019 at 9:34 AM Lee Jones <lee.jones@linaro.org> wrote:

> 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>


Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 074c8fa3e75c..eba872ce4a7c 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -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) {