Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d22eb66b authored by Axel Lin's avatar Axel Lin Committed by Stephen Boyd
Browse files

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



platform_device_register_simple() returns ERR_PTR on error.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 1ce133ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;