Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375291
b: refs/heads/master
c: a30450c
h: refs/heads/master
i:
  375289: aa145b0
  375287: 94d5d3b
v: v3
  • Loading branch information
David Woodhouse authored and Matthew Garrett committed May 8, 2013
1 parent 3357657 commit 6eb3bd0
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 7783819920ca52fc582a2782f654fe6ed373f465
refs/heads/master: a30450c7bbb04212c5f01936274ca8d965cabf79
10 changes: 6 additions & 4 deletions trunk/drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static void __init parse_da_table(const struct dmi_header *dm)
{
/* Final token is a terminator, so we don't want to copy it */
int tokens = (dm->length-11)/sizeof(struct calling_interface_token)-1;
struct calling_interface_token *new_da_tokens;
struct calling_interface_structure *table =
container_of(dm, struct calling_interface_structure, header);

Expand All @@ -296,12 +297,13 @@ static void __init parse_da_table(const struct dmi_header *dm)
da_command_address = table->cmdIOAddress;
da_command_code = table->cmdIOCode;

da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
sizeof(struct calling_interface_token),
GFP_KERNEL);
new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
sizeof(struct calling_interface_token),
GFP_KERNEL);

if (!da_tokens)
if (!new_da_tokens)
return;
da_tokens = new_da_tokens;

memcpy(da_tokens+da_num_tokens, table->tokens,
sizeof(struct calling_interface_token) * tokens);
Expand Down

0 comments on commit 6eb3bd0

Please sign in to comment.