]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/clocksource/acpi_pm.c
clocksource: check range
[linux-2.6-omap-h63xx.git] / drivers / clocksource / acpi_pm.c
index 5ca1d80de182bfa3bb333f0aeca907f7929ed26c..3df338481004c0bbdf69debbca9dd4d69b6bd026 100644 (file)
@@ -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;