Re: [PATCH] staging: comedi: ni_tio: fix warnings of uninitialized variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/10/16 15:29, Ted Chen wrote:
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@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_tio.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

This patch (Message-Id: <1477841360-3949-1-git-send-email-tedc.37zngo@xxxxxxxxx>) should really have been tagged as "[PATCH v2]" and should have included a brief description (after the "---" line) of changes since the first patch, which I guess would be something along the lines of:

v2: In function 'ni_tio_set_sync_mode', also initialize 'clk_src' and return early if 'ni_tio_generic_clock_src_select' returns an error.

(I don't think you need to resend the patch for that, as I'm sure Greg can figure it out.)

Apart from that, the patch looks fine, thanks!

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux