Skip to content

Commit

Permalink
USB: FIX bitfield istl_flip:1, make it unsigned.
Browse files Browse the repository at this point in the history
istl_flip is a signed bitfield of one bit so it can be -1 or 0.
However in drivers/usb/host/isp1362-hcd.c:1103:

finish_iso_transfers(isp1362_hcd,
	&isp1362_hcd->istl_queue[isp1362_hcd->istl_flip]);

So if isp1362_hcd->istl_flip is set, the 2nd argument becomes
&isp1362_hcd->istl_queue[-1], which is invalid.

Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
RoelKluin authored and gregkh committed Dec 11, 2009
1 parent 55f49f2 commit 22a627b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/isp1362.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ struct isp1362_hcd {

/* periodic schedule: isochronous */
struct list_head isoc;
int istl_flip:1;
int irq_active:1;
unsigned int istl_flip:1;
unsigned int irq_active:1;

/* Schedules for the current frame */
struct isp1362_ep_queue atl_queue;
Expand Down

0 comments on commit 22a627b

Please sign in to comment.