Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185100
b: refs/heads/master
c: 58aaa54
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Feb 24, 2010
1 parent d7c98bf commit ea6e533
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2799d5c5f9d2064c6d1f50ec82e28e3eac5f6954
refs/heads/master: 58aaa5427663b680030aa58aaaf1e2738564b8dc
6 changes: 2 additions & 4 deletions trunk/drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ static int read_rom(struct fw_device *device,
}

#define READ_BIB_ROM_SIZE 256
#define READ_BIB_STACK_SIZE 16

/*
* Read the bus info block, perform a speed probe, and read all of the rest of
Expand All @@ -510,7 +509,7 @@ static int read_bus_info_block(struct fw_device *device, int generation)
int i, end, length, ret = -1;

rom = kmalloc(sizeof(*rom) * READ_BIB_ROM_SIZE +
sizeof(*stack) * READ_BIB_STACK_SIZE, GFP_KERNEL);
sizeof(*stack) * READ_BIB_ROM_SIZE, GFP_KERNEL);
if (rom == NULL)
return -ENOMEM;

Expand Down Expand Up @@ -612,8 +611,7 @@ static int read_bus_info_block(struct fw_device *device, int generation)
RCODE_COMPLETE)
goto out;

if ((key >> 30) != 3 || (rom[i] >> 30) < 2 ||
sp >= READ_BIB_STACK_SIZE)
if ((key >> 30) != 3 || (rom[i] >> 30) < 2)
continue;
/*
* Offset points outside the ROM. May be a firmware
Expand Down

0 comments on commit ea6e533

Please sign in to comment.