gpio: qpnp-pin: Fix out of bound shift
UBSAN: Undefined behaviour in drivers/gpio/qpnp-pin.c:664:6
shift exponent -1 is negative
Call trace:
[<ffffffc00008ad5c>] dump_backtrace+0x0/0x1a4
[<ffffffc00008af10>] show_stack+0x10/0x1c
[<ffffffc00142ed60>] dump_stack+0x7c/0xe8
[<ffffffc0005282d0>] ubsan_epilogue+0x10/0x54
[<ffffffc000528cec>] __ubsan_handle_shift_out_of_bounds+0x12c/0x160
[<ffffffc000545b78>] _qpnp_pin_config+0x65c/0x920
[<ffffffc000546b00>] qpnp_pin_probe+0xb14/0xc44
Add check for valid dtest-line before configuring the gpio.
CRs-Fixed: 981729
Change-Id: I26c6edcd26da9cfbbf2859bf9d93477f5cb1b4f5
Signed-off-by:
Ashay Jaiswal <ashayj@codeaurora.org>
Loading
Please register or sign in to comment