]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/platform/x86/intel_ips.c
intel_ips: potential null dereference
[net-next-2.6.git] / drivers / platform / x86 / intel_ips.c
index fad59b69a69cbc945bc929d01781128ca95b7b30..9024480a82288ec071e26008f616fe2d9556c18b 100644 (file)
@@ -1342,8 +1342,10 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
                limits = &ips_lv_limits;
        else if (strstr(boot_cpu_data.x86_model_id, "CPU       U"))
                limits = &ips_ulv_limits;
-       else
+       else {
                dev_info(&ips->dev->dev, "No CPUID match found.\n");
+               goto out;
+       }
 
        rdmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_power);
        tdp = turbo_power & TURBO_TDP_MASK;