linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* clk: scpi: Fix checking return value of platform_device_register_simple()
@ 2015-12-04  6:51 Axel Lin
  2015-12-04  9:55 ` Sudeep Holla
  2016-01-30  0:29 ` Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2015-12-04  6:51 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette; +Cc: Sudeep Holla, linux-clk

platform_device_register_simple() returns ERR_PTR on error.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/clk/clk-scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index cd0f272..89e9ca7 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)
 	/* 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;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-30  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-04  6:51 clk: scpi: Fix checking return value of platform_device_register_simple() Axel Lin
2015-12-04  9:55 ` Sudeep Holla
2016-01-29 18:42   ` Sudeep Holla
2016-01-30  0:29 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).