diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-12-04 01:51:36 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-01-29 15:07:59 -0500 |
commit | d22eb66b3cc3d7d486bc9fa8c6fdbce197eede5f (patch) | |
tree | 0f36f3b819f86bd3da6afd6fbed0d42ad64b67e6 | |
parent | 1ce133ec89027dc2dff6d0784564da27f1c21fdc (diff) |
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>
-rw-r--r-- | drivers/clk/clk-scpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c index cd0f2726f5e0..89e9ca78bb94 100644 --- a/drivers/clk/clk-scpi.c +++ b/drivers/clk/clk-scpi.c | |||
@@ -299,7 +299,7 @@ static int scpi_clocks_probe(struct platform_device *pdev) | |||
299 | /* Add the virtual cpufreq device */ | 299 | /* Add the virtual cpufreq device */ |
300 | cpufreq_dev = platform_device_register_simple("scpi-cpufreq", | 300 | cpufreq_dev = platform_device_register_simple("scpi-cpufreq", |
301 | -1, NULL, 0); | 301 | -1, NULL, 0); |
302 | if (!cpufreq_dev) | 302 | if (IS_ERR(cpufreq_dev)) |
303 | pr_warn("unable to register cpufreq device"); | 303 | pr_warn("unable to register cpufreq device"); |
304 | 304 | ||
305 | return 0; | 305 | return 0; |