From: Cyrill Gorcunov Date: Wed, 20 Aug 2008 23:41:45 +0000 (-0700) Subject: acpi: add checking for NULL early param X-Git-Tag: v2.6.27-rc6~39^2~6^2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f0df2d6b52ad7db5edf56909509d51be66fe90be;p=linux-2.6-omap-h63xx.git 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 Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen --- diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index c3419182c9a..775c97a282b 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -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);