Skip to content

Commit

Permalink
[PATCH] ieee1394: fix cross_bound check for null ISO packets
Browse files Browse the repository at this point in the history
Fix cross_bound to not return 1 for zero-length regions.  Fixes regression
when sending null ISO packets.

Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jody McIntyre authored and Linus Torvalds committed May 17, 2005
1 parent 8d98c5c commit 74a01d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/ieee1394/ohci1394.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ struct ti_ohci {

static inline int cross_bound(unsigned long addr, unsigned int size)
{
if (size == 0)
return 0;

if (size > PAGE_SIZE)
return 1;

Expand Down

0 comments on commit 74a01d1

Please sign in to comment.