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

staging: comedi: dt2801: fix using uninitialized variable warnings



As pointed out by Fengguang Wu, the calls to dt2801_readdata() return the
data read thru a pointer (the address of a local variable) passed as a
parameter. If this local variable is not initialized it produces a warning
during the build of the form:

drivers/staging/comedi/drivers/dt2801.c: In function 'dt2801_ai_insn_read':
drivers/staging/comedi/drivers/dt2801.c:273:14: warning: 'hb' is used
      uninitialized in this function [-Wuninitialized]

Fix these warning by making sure the local variables are initialized.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48c8cd29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment