acpi: add checking for NULL early param

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 <[email protected]>
Cc: Andi Kleen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
This commit is contained in:
Cyrill Gorcunov 2008-08-20 16:41:45 -07:00 • committed by Andi Kleen
commit f0df2d6b52

View file

@ -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);