lkml.org 
[lkml]   [2017]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ACPICA: Check whether ACPI is disabled before getting a table
On Mon, Aug 21, 2017 at 3:20 PM, Borislav Petkov <bp@alien8.de> wrote:
> Borislav Petkov <bp@suse.de>
>
> ... and save us the splrinking of this test around in the callers.
>
> No functionality change.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> drivers/acpi/acpica/tbxface.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
> index 010b1c43df92..881b0d5b2838 100644
> --- a/drivers/acpi/acpica/tbxface.c
> +++ b/drivers/acpi/acpica/tbxface.c
> @@ -226,6 +226,9 @@ acpi_get_table_header(char *signature,
> u32 j;
> struct acpi_table_header *header;
>
> + if (acpi_disabled)
> + return (AE_ERROR);
> +
> /* Parameter validation */
>
> if (!signature || !out_table_header) {
> --

Is acpi_disabled an ACPICA variable? If not, this cannot go upstream.
Not a big deal I guess, but somewhat yucky.

\
 
 \ /
  Last update: 2017-08-21 15:32    [W:0.067 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site