From accb298fb2e3d09a84bd92595b115232f14a5e60 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 20 Apr 2015 11:49:05 -0700 Subject: [PATCH] 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-format-patch failed