mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
clk: scpi: Fix checking return value of platform_device_register_simple()
platform_device_register_simple() returns ERR_PTR on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
1ce133ec89
commit
d22eb66b3c
@ -299,7 +299,7 @@ static int scpi_clocks_probe(struct platform_device *pdev)
|
|||||||
/* Add the virtual cpufreq device */
|
/* Add the virtual cpufreq device */
|
||||||
cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
|
cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
|
||||||
-1, NULL, 0);
|
-1, NULL, 0);
|
||||||
if (!cpufreq_dev)
|
if (IS_ERR(cpufreq_dev))
|
||||||
pr_warn("unable to register cpufreq device");
|
pr_warn("unable to register cpufreq device");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user