staging: comedi: ni_tio: fix warnings of uninitialized variables
authorTed Chen <tedc.37zngo@gmail.com>
Sun, 30 Oct 2016 15:29:20 +0000 (23:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2016 10:22:47 +0000 (11:22 +0100)
commitc9b32721225b103f3e3fc406600aaaaddc2e8053
treee1c62ba41e9dc8975a8d7ecdc8185f8788ec17dc
parent48157007c8d4374949ed9d3a95e6bf0b8559979e
staging: comedi: ni_tio: fix warnings of uninitialized variables

Fix the following warnings by initializing these variables
to zero and add error check to return early when the check
returns an error.

drivers/staging/comedi/drivers/ni_tio.c: In function ‘ni_tio_set_sync_mode’:
drivers/staging/comedi/drivers/ni_tio.c:492:28: warning: ‘ps’ may be used uninitialized in this function [-Wuninitialized]
drivers/staging/comedi/drivers/ni_tio.c: In function ‘ni_tio_insn_config’:
drivers/staging/comedi/drivers/ni_tio.c:820:2: warning: ‘temp64’ may be used uninitialized in this function [-Wuninitialized]
drivers/staging/comedi/drivers/ni_tio.c:811:6: note: ‘temp64’ was declared her

Signed-off-by: Ted Chen <tedc.37zngo@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_tio.c