Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4728
b: refs/heads/master
c: d1dd0c2
h: refs/heads/master
v: v3
  • Loading branch information
Paulo Marques authored and Len Brown committed Jul 12, 2005
1 parent a1bf588 commit f7ca09e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 7334571f724df7a19f48cc974e991e00afde1e2f
refs/heads/master: d1dd0c23916bd781de27bc5ec1c295064e9ce9cc
13 changes: 6 additions & 7 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,13 @@ acpi_video_device_find_cap (struct acpi_video_device *device)
int count = 0;
union acpi_object *o;

br = kmalloc(sizeof &br, GFP_KERNEL);
br = kmalloc(sizeof(*br), GFP_KERNEL);
if (!br) {
printk(KERN_ERR "can't allocate memory\n");
} else {
memset(br, 0, sizeof &br);
br->levels = kmalloc(obj->package.count * sizeof &br->levels, GFP_KERNEL);
memset(br, 0, sizeof(*br));
br->levels = kmalloc(obj->package.count *
sizeof *(br->levels), GFP_KERNEL);
if (!br->levels)
goto out;

Expand All @@ -584,8 +585,7 @@ acpi_video_device_find_cap (struct acpi_video_device *device)
}
out:
if (count < 2) {
if (br->levels)
kfree(br->levels);
kfree(br->levels);
kfree(br);
} else {
br->count = count;
Expand All @@ -595,8 +595,7 @@ acpi_video_device_find_cap (struct acpi_video_device *device)
}
}

if (obj)
kfree(obj);
kfree(obj);

return_VOID;
}
Expand Down

0 comments on commit f7ca09e

Please sign in to comment.