All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc()
@ 2021-06-09 17:51 Hans de Goede
  2021-06-10  7:01 ` Mika Westerberg
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2021-06-09 17:51 UTC (permalink / raw
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Mika Westerberg, linux-acpi

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@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc()
  2021-06-09 17:51 [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc() Hans de Goede
@ 2021-06-10  7:01 ` Mika Westerberg
  2021-06-10 13:25   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2021-06-10  7:01 UTC (permalink / raw
  To: Hans de Goede; +Cc: Rafael J . Wysocki, linux-acpi

On Wed, Jun 09, 2021 at 07:51:30PM +0200, Hans de Goede wrote:
> 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@redhat.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc()
  2021-06-10  7:01 ` Mika Westerberg
@ 2021-06-10 13:25   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2021-06-10 13:25 UTC (permalink / raw
  To: Mika Westerberg, Hans de Goede; +Cc: Rafael J . Wysocki, ACPI Devel Maling List

On Thu, Jun 10, 2021 at 9:01 AM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> On Wed, Jun 09, 2021 at 07:51:30PM +0200, Hans de Goede wrote:
> > 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@redhat.com>
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Applied as 5.14 material, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-10 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-09 17:51 [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc() Hans de Goede
2021-06-10  7:01 ` Mika Westerberg
2021-06-10 13:25   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.