From: Mattia Dongili Date: Sat, 19 May 2012 13:35:45 +0000 (+0900) Subject: sony-laptop: fix return path when no ACPI buffer is allocated X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3398241b0567c662a6fcf7e61c72c74aa9cee3e8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sony-laptop: fix return path when no ACPI buffer is allocated The goto target location would still try to free a buffer that was never allocated. Signed-off-by: Mattia Dongili Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index c6dc3f741ccd..455beeb98be1 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -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",