[PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



context->ret.pointer already gets set to NULL at the beginning of
acpi_run_osc() and it only gets assigned a new value in the success
path near the end of acpi_run_osc(), so the clearing of
context->ret.pointer (when status != AE_OK) at the end of
acpi_run_osc() is redundant since it will always already be NULL when
status != AE_OK.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 drivers/acpi/bus.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a4bd673934c0..ab41185cd2a8 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -262,8 +262,6 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
 
 out_kfree:
 	kfree(output.pointer);
-	if (status != AE_OK)
-		context->ret.pointer = NULL;
 	return status;
 }
 EXPORT_SYMBOL(acpi_run_osc);
-- 
2.31.1




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux