Skip to content

Commit

Permalink
sony-laptop: fix return path when no ACPI buffer is allocated
Browse files Browse the repository at this point in the history
The goto target location would still try to free a buffer that was
never allocated.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Mattia Dongili authored and Matthew Garrett committed May 31, 2012
1 parent d6f15ed commit 3398241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,8 @@ static void sony_nc_rfkill_setup(struct acpi_device *device)

device_enum = (union acpi_object *) buffer.pointer;
if (!device_enum) {
pr_err("No SN06 return object\n");
goto out_no_enum;
pr_err("No SN06 return object.");
return;
}
if (device_enum->type != ACPI_TYPE_BUFFER) {
pr_err("Invalid SN06 return object 0x%.2x\n",
Expand Down

0 comments on commit 3398241

Please sign in to comment.