From: Paul Bolle Date: Mon, 4 Mar 2013 12:43:20 +0000 (-0300) Subject: [media] m920x: let GCC see 'ret' is used initialized X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~81^2~504 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b78a1f372210ae8c19426cb3ae708bf85aa70124;p=pandora-kernel.git [media] m920x: let GCC see 'ret' is used initialized Since commit 7543f344e9b06afe86b55a2620f5c11b38bd5642 ("[media] m920x: factor out a m920x_write_seq() function") building m920x.o triggers this GCC warning: drivers/media/usb/dvb-usb/m920x.c: In function ‘m920x_probe’: drivers/media/usb/dvb-usb/m920x.c:91:6: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized] This warning is caused by m920x_write_seq(), which is apparently inlined into m920x_probe(). It is clear why GCC thinks 'ret' may be used uninitialized. But in practice the first seq->address will always be non-zero when this function is called. That means we can change the while()-do{} loop into a do{}-while() loop. And that suffices to make GCC see that 'ret' will not be used uninitialized. Signed-off-by: Paul Bolle Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed