Merge tag 'pci-v5.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux-2.6-microblaze.git] / drivers / acpi / acpi_extlog.c
index f138e12..72f1fb7 100644 (file)
@@ -222,9 +222,9 @@ static int __init extlog_init(void)
        u64 cap;
        int rc;
 
-       rdmsrl(MSR_IA32_MCG_CAP, cap);
-
-       if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
+       if (rdmsrl_safe(MSR_IA32_MCG_CAP, &cap) ||
+           !(cap & MCG_ELOG_P) ||
+           !extlog_get_l1addr())
                return -ENODEV;
 
        rc = -EINVAL;