Commit 52d7ee55 authored by Dan Carpenter's avatar Dan Carpenter Committed by Matthew Garrett

intel_ips: potential null dereference

There is a potential NULL dereference of "limits."  We can just return
NULL earlier to avoid it.  The caller already handles NULL returns.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 2e0ee69c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment