sony-laptop: fix return path when no ACPI buffer is allocated
authorMattia Dongili <malattia@linux.it>
Sat, 19 May 2012 13:35:45 +0000 (22:35 +0900)
committerMatthew Garrett <mjg@redhat.com>
Thu, 31 May 2012 18:29:34 +0000 (14:29 -0400)
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>
drivers/platform/x86/sony-laptop.c

index c6dc3f741ccd3147ada37b3897fa0629d998bb54..455beeb98be1ef980d344b71157ce4c6ad93287e 100644 (file)
@@ -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",