summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables.c
diff options
context:
space:
mode:
authorChristoph Jaeger <christophjaeger@linux.com>2014-06-13 21:49:58 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-17 14:01:56 +0200
commit3d915894f8317ac3e55b47da829aa65eb5f9ae97 (patch)
treef8e523b5f549d1a3779c01b51c2900f057e52dd7 /drivers/acpi/tables.c
parentLinux 3.16-rc1 (diff)
downloadlinux-3d915894f8317ac3e55b47da829aa65eb5f9ae97.tar.xz
linux-3d915894f8317ac3e55b47da829aa65eb5f9ae97.zip
ACPI: use kstrto*() instead of simple_strto*()
simple_strto*() are obsolete; use kstrto*() instead. Add proper error checking. Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r--drivers/acpi/tables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 05550ba44d32..6d5a6cda0734 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -360,7 +360,8 @@ static int __init acpi_parse_apic_instance(char *str)
if (!str)
return -EINVAL;
- acpi_apic_instance = simple_strtoul(str, NULL, 0);
+ if (kstrtoint(str, 0, &acpi_apic_instance))
+ return -EINVAL;
pr_notice("Shall use APIC/MADT table %d\n", acpi_apic_instance);