Skip to content
Commit e988e1f3 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_at_a2150: range check board index



The "ni_at_a2150" driver determines the board type by calling
`a2150_probe()`.  This reads a register and converts it to a board index
in the range 0 to 3.  However, the board table array it indexes into
(`a2150_boards[]`) only has 2 entries.  Return an error from the
Comedi driver "attach" handler `a2150_attach()` if the probed board
index is beyond the end of the array.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 395262a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment