summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/acpi_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clocksource/acpi_pm.c')
-rw-r--r--drivers/clocksource/acpi_pm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 5ca1d80..3df3384 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -226,9 +226,12 @@ static int __init parse_pmtmr(char *arg)
if (strict_strtoul(arg, 16, &base))
return -EINVAL;
-
+#ifdef CONFIG_X86_64
+ if (base > UINT_MAX)
+ return -ERANGE;
+#endif
printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n",
- (unsigned int)pmtmr_ioport, base);
+ pmtmr_ioport, base);
pmtmr_ioport = base;
return 1;
OpenPOWER on IntegriCloud