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

Commit e0435f24 authored by Abdulla Anam's avatar Abdulla Anam Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Check presence of property before calling cx register



Check presence of cx-ipeak-data property before calling cx ipeak
register. cx-ipeak-driver module can be enabled for unusupported
targets as well.

Change-Id: Ieb9b3b1981a161244888c6500e472afc1ebce758
Signed-off-by: default avatarAbdulla Anam <abdullahanam@codeaurora.org>
parent 3d82d664
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1137,8 +1137,11 @@ int read_platform_resources_from_dt(
			"qcom,max-secure-instances",
			&res->max_secure_inst_count);

	res->cx_ipeak_context = cx_ipeak_register(pdev->dev.of_node,
			"qcom,cx-ipeak-data");
	if (of_find_property(pdev->dev.of_node,
			"qcom,cx-ipeak-data", NULL)) {
		res->cx_ipeak_context = cx_ipeak_register(
			pdev->dev.of_node, "qcom,cx-ipeak-data");
	}

	if (IS_ERR(res->cx_ipeak_context)) {
		rc = PTR_ERR(res->cx_ipeak_context);