On Tue, 17 Apr 2007, Oliver Neukum wrote:

> > It looks like you are missing brackets around the else case.
> 
> Which else case?

The "dev->buffer_overflow = 1" line is indented to the same level as the 
preceding "dev_warn" line, which makes it appear as though it is supposed 
to belong to the same "else" case as the dev_warn.  The actual code looks 
like this:

        if (urb->actual_length > 0) {
                next_ring_head = (dev->ring_head+1) % ring_buffer_size;
                if (next_ring_head != dev->ring_tail) {
                        ...
                } else
                        dev_warn(&dev->intf->dev,
                                 "Ring buffer overflow, %d bytes dropped\n",
                                 urb->actual_length);
+                       dev->buffer_overflow = 1;
        }

You see the problem?

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to