summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-acpi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 09:08:32 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 09:08:32 +0400
commitd798f7f080805ad7e15fc37a43d8c6f91edb6dda (patch)
tree73e3783cb619d3a5dc40a5f32859f063b5cd0664 /drivers/ide/ide-acpi.c
parente98bae7592a44bdce2e49ccd64f3c7ffe244a0f6 (diff)
parentdb210f824c2f155703edf03bc2137da1bd76e27d (diff)
downloadlinux-d798f7f080805ad7e15fc37a43d8c6f91edb6dda.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide/ide-scan-pci.c: Use for_each_pci_dev(). ide: Use linux/mutex.h IDE: ide-floppy, remove unnecessary NULL check drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata ide: fix use after free in ide-acpi
Diffstat (limited to 'drivers/ide/ide-acpi.c')
-rw-r--r--drivers/ide/ide-acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index c26c11905ffe..2af8cb460a3b 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -416,21 +416,21 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)
out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) {
- kfree(output.pointer);
DEBPRINT("Run _GTM: error: "
"expected object type of ACPI_TYPE_BUFFER, "
"got 0x%x\n", out_obj->type);
+ kfree(output.pointer);
return;
}
if (!out_obj->buffer.length || !out_obj->buffer.pointer ||
out_obj->buffer.length != sizeof(struct GTM_buffer)) {
- kfree(output.pointer);
printk(KERN_ERR
"%s: unexpected _GTM length (0x%x)[should be 0x%zx] or "
"addr (0x%p)\n",
__func__, out_obj->buffer.length,
sizeof(struct GTM_buffer), out_obj->buffer.pointer);
+ kfree(output.pointer);
return;
}