Commit d52a03b1 authored by Peng Fan's avatar Peng Fan Committed by Stefano Babic

imx8: cpu: check resource owned after sid fail

When we create software partition, we still need let parent
partition to configure sid, so move the check after sid failed.
Acked-by: default avatarYe Li <ye.li@nxp.com>
Signed-off-by: Peng Fan's avatarPeng Fan <peng.fan@nxp.com>
parent a6c36f15
......@@ -106,13 +106,13 @@ static int config_smmu_resource_sid(int rsrc, int sid)
{
int err;
if (!check_owned_resource(rsrc)) {
printf("%s rsrc[%d] not owned\n", __func__, rsrc);
return -1;
}
err = sc_rm_set_master_sid(-1, rsrc, sid);
debug("set_master_sid rsrc=%d sid=0x%x err=%d\n", rsrc, sid, err);
if (err != SC_ERR_NONE) {
if (!check_owned_resource(rsrc)) {
printf("%s rsrc[%d] not owned\n", __func__, rsrc);
return -1;
}
pr_err("fail set_master_sid rsrc=%d sid=0x%x err=%d\n", rsrc, sid, err);
return -EINVAL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment