Re: [PATCH v2] gpio: wcd934x: Fix shift-out-of-bounds error

2021-03-10 Thread Bjorn Andersson
On Wed 10 Mar 11:43 CST 2021, Srinivas Kandagatla wrote: > bit-mask for pins 0 to 4 is BIT(0) to BIT(4) however we ended up with BIT(n - > 1) > which is not right, and this was caught by below usban check > > UBSAN: shift-out-of-bounds in drivers/gpio/gpio-wcd934x.c:34:14 > > Fixes: 59c32468340

[PATCH v2] gpio: wcd934x: Fix shift-out-of-bounds error

2021-03-10 Thread Srinivas Kandagatla
bit-mask for pins 0 to 4 is BIT(0) to BIT(4) however we ended up with BIT(n - 1) which is not right, and this was caught by below usban check UBSAN: shift-out-of-bounds in drivers/gpio/gpio-wcd934x.c:34:14 Fixes: 59c324683400 ("gpio: wcd934x: Add support to wcd934x gpio controller") Signed-off-by