staging:ozwpan: Fix following warning.
authorRupesh Gujare <rupesh.gujare@atmel.com>
Tue, 29 Jan 2013 17:00:55 +0000 (17:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2013 04:25:10 +0000 (23:25 -0500)
The patch ae926051d7eb: "staging: ozwpan: Added USB HCD
implementation" from Feb 20, 2012, leads to the following warning:
drivers/staging/ozwpan/ozhcd.c:1094 oz_hcd_heartbeat()
 warn: what is this condition about? 'ep->buffered_units * 50'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ozwpan/ozhcd.c

index b2d77df2a5264e05eb2ca7b234e1a1d934380736..9154f335f783906fa62ea23ea290401b9df1ba57 100644 (file)
@@ -1091,7 +1091,7 @@ int oz_hcd_heartbeat(void *hport)
        list_for_each(e, &port->isoc_in_ep) {
                struct oz_endpoint *ep = ep_from_link(e);
                if (ep->flags & OZ_F_EP_BUFFERING) {
-                       if (ep->buffered_units * OZ_IN_BUFFERING_UNITS) {
+                       if (ep->buffered_units >= OZ_IN_BUFFERING_UNITS) {
                                ep->flags &= ~OZ_F_EP_BUFFERING;
                                ep->credit = 0;
                                oz_event_log(OZ_EVT_EP_CREDIT,