提交 d22eb66b 编写于 作者: A Axel Lin 提交者: Stephen Boyd

clk: scpi: Fix checking return value of platform_device_register_simple()

platform_device_register_simple() returns ERR_PTR on error.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 1ce133ec
......@@ -299,7 +299,7 @@ static int scpi_clocks_probe(struct platform_device *pdev)
/* Add the virtual cpufreq device */
cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
-1, NULL, 0);
if (!cpufreq_dev)
if (IS_ERR(cpufreq_dev))
pr_warn("unable to register cpufreq device");
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册