diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
commit | c514720716c7b109ff980f8b3cb93f9af872c91c (patch) | |
tree | 490a9578995705de69712893a190b67651bddc56 /drivers/acpi/video.c | |
parent | 07929dcb963786512c760dd3ecd148d89295e7e5 (diff) | |
parent | 1e279dd855d15b72364b4103f872d67d8592647e (diff) | |
download | op-kernel-dev-c514720716c7b109ff980f8b3cb93f9af872c91c.zip op-kernel-dev-c514720716c7b109ff980f8b3cb93f9af872c91c.tar.gz |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 71fa101..2cf264f 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -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; @@ -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; @@ -595,8 +595,7 @@ out: } } - if (obj) - kfree(obj); + kfree(obj); return_VOID; } @@ -1585,7 +1584,7 @@ acpi_video_switch_output( ACPI_FUNCTION_TRACE("acpi_video_switch_output"); list_for_each_safe(node, next, &video->video_device_list) { - struct acpi_video_device * dev = container_of(node, struct acpi_video_device, entry); + dev = container_of(node, struct acpi_video_device, entry); status = acpi_video_device_get_state(dev, &state); if (state & 0x2){ dev_next = container_of(node->next, struct acpi_video_device, entry); |