Skip to content
Commit accb298f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_nio_common: don't write non-existing caldac's



ni_write_caldac() checks the boardinfo 'caldac' array to determine what
caldac is used for a given 'addr'. It then calculates the 'bitstring' and
number of 'bits' used to write a value to that caldac address.

After checking the caldac array, if the number of bits is 0 there is no
caldac associated with the address. If this happens we shouldn't try
writing to the non-existing caldac.

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