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

Commit 17d08164 authored by Sumukh Hallymysore Ravindra's avatar Sumukh Hallymysore Ravindra
Browse files

msm: synx: Fix external type and pointer check



Fix the check made if the external object is of valid
type and can be bound to synx object.
Also, fix the check to verify if the provided pointer
to pass the newly created synx object id is valid.

Change-Id: I1a2a5c777ff0948ebe5ab638d884db2b08de2d43
Signed-off-by: default avatarSumukh Hallymysore Ravindra <shallymy@codeaurora.org>
parent b330acd3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ int synx_bind(s32 synx_obj, struct synx_external_desc external_sync)
		return -EINVAL;
	}

	if (is_valid_type(external_sync.type)) {
	if (!is_valid_type(external_sync.type)) {
		pr_err("invalid external sync object\n");
		return -EINVAL;
	}
@@ -656,7 +656,7 @@ int synx_import(s32 synx_obj, u32 secure_key, s32 *new_synx_obj)

	pr_debug("Enter %s\n", __func__);

	if (!synx_obj)
	if (!new_synx_obj)
		return -EINVAL;

	row = synx_from_key(synx_obj, secure_key);