On Mon, Nov 28, 2005 at 12:52:20PM -0800, Greg KH wrote: > On Wed, Nov 23, 2005 at 09:31:50PM +0100, Adrian Bunk wrote: > > On Wed, Nov 23, 2005 at 11:02:37AM -0800, Greg KH wrote: > > > On Mon, Nov 21, 2005 at 12:22:39AM +0100, Adrian Bunk wrote: > > > > The Coverity checker found this obviously dead code. > > > > > > I think the checker is wrong, this does not look correct to me. > > > > Why? > > > > Due to the while(length), length can't be 0 at the switch. > > Doh, ok, nevermind. Care to resend this?
It's below. > thanks, > > greg k-h cu Adrian <-- snip --> The Coverity checker found this dead code. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- drivers/usb/misc/sisusbvga/sisusb.c | 6 ------ 1 file changed, 6 deletions(-) --- linux-2.6.15-rc1-mm2-full/drivers/usb/misc/sisusbvga/sisusb.c.old 2005-11-20 22:56:41.000000000 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/usb/misc/sisusbvga/sisusb.c 2005-11-20 22:58:22.000000000 +0100 @@ -861,13 +861,10 @@ while (length) { switch (length) { - case 0: - return ret; - case 1: if (userbuffer) { if (get_user(swap8, (u8 __user *)userbuffer)) return -EFAULT; } else @@ -1219,13 +1216,10 @@ while (length) { switch (length) { - case 0: - return ret; - case 1: ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, addr, &buf[0]); if (!ret) { ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel