Skip to content

Commit

Permalink
acpi: add checking for NULL early param
Browse files Browse the repository at this point in the history
The early_param handling function could recieve NULL pointer as argument
in case if user didn't enter parameter value.  So we have to be ready for
a such situation and do check for NULL pointer if needed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
  • Loading branch information
Cyrill Gorcunov authored and Andi Kleen committed Aug 21, 2008
1 parent 1371c89 commit f0df2d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ int __init acpi_table_init(void)

static int __init acpi_parse_apic_instance(char *str)
{
if (!str)
return -EINVAL;

acpi_apic_instance = simple_strtoul(str, NULL, 0);

Expand Down

0 comments on commit f0df2d6

Please sign in to comment.