Skip to content
Commit d15d6cf9 authored by William Breathitt Gray's avatar William Breathitt Gray Committed by Linus Walleij
Browse files

gpio: 104-dio-48e: Fix control port offset computation off-by-one error

There are only two control ports, each controlling three distinct I/O
ports. To compute the control port address offset for a respective I/O
port, the I/O port address offset should be divided by 3; dividing by 2
may result in not only the wrong address offset but possibly also an
out-of-bounds array memory access for a non-existent third control port.

Fixes: 1b06d64f

 ("gpio: Add GPIO support for the ACCES 104-DIO-48E")
Signed-off-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent af8c34ce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment