From: H Hartley Sweeten Date: Mon, 20 Apr 2015 18:49:05 +0000 (-0700) Subject: staging: comedi: ni_nio_common: don't write non-existing caldac's X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~963 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=accb298fb2e3d09a84bd92595b115232f14a5e60;p=pandora-kernel.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed