diff options
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 3f2bdc812d23..3abe9b223ba7 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -235,7 +235,8 @@ void acpi_os_vprintf(const char *fmt, va_list args) | |||
235 | static unsigned long acpi_rsdp; | 235 | static unsigned long acpi_rsdp; |
236 | static int __init setup_acpi_rsdp(char *arg) | 236 | static int __init setup_acpi_rsdp(char *arg) |
237 | { | 237 | { |
238 | acpi_rsdp = simple_strtoul(arg, NULL, 16); | 238 | if (kstrtoul(arg, 16, &acpi_rsdp)) |
239 | return -EINVAL; | ||
239 | return 0; | 240 | return 0; |
240 | } | 241 | } |
241 | early_param("acpi_rsdp", setup_acpi_rsdp); | 242 | early_param("acpi_rsdp", setup_acpi_rsdp); |
@@ -258,12 +259,14 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) | |||
258 | "System description tables not found\n"); | 259 | "System description tables not found\n"); |
259 | return 0; | 260 | return 0; |
260 | } | 261 | } |
261 | } else { | 262 | } else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) { |
262 | acpi_physical_address pa = 0; | 263 | acpi_physical_address pa = 0; |
263 | 264 | ||
264 | acpi_find_root_pointer(&pa); | 265 | acpi_find_root_pointer(&pa); |
265 | return pa; | 266 | return pa; |
266 | } | 267 | } |
268 | |||
269 | return 0; | ||
267 | } | 270 | } |
268 | 271 | ||
269 | /* Must be called with 'acpi_ioremap_lock' or RCU read lock held. */ | 272 | /* Must be called with 'acpi_ioremap_lock' or RCU read lock held. */ |