summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-06-21 08:40:24 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-06-21 08:40:23 -0700
commitabc2a59bfdb9652448374972a284a4763dd64ca8 (patch)
treedf53ec41e582d902589bbbc7698c76f296e889d1
parent9998d2e52dd44eeebc6577676e63985eabebbb5a (diff)
parent7ec9476039c19c103de3667e7d5e2dcb818cfdcc (diff)
Merge "soc: qcom: hab: add error handling when dt item is missing"
-rw-r--r--drivers/soc/qcom/hab/hab_ghs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/soc/qcom/hab/hab_ghs.c b/drivers/soc/qcom/hab/hab_ghs.c
index 01f42b5f67ac..2c8fb14dad1f 100644
--- a/drivers/soc/qcom/hab/hab_ghs.c
+++ b/drivers/soc/qcom/hab/hab_ghs.c
@@ -169,6 +169,7 @@ int habhyp_commdev_alloc(void **commdev, int is_be, char *name, int vmid_remote,
mmid_device->name,
mmid_device->id,
dt_name_idx);
+ of_node_put(gvh_dn);
ret = -ENOENT;
goto err;
}
@@ -176,9 +177,13 @@ int habhyp_commdev_alloc(void **commdev, int is_be, char *name, int vmid_remote,
ret = of_property_read_string(gvh_dn,
ghs_vmm_plugin_info.dt_name[dt_name_idx],
&ep_path);
- if (ret)
+ if (ret) {
pr_err("failed to read endpoint str ret %d\n",
ret);
+ of_node_put(gvh_dn);
+ ret = -ENOENT;
+ goto err;
+ }
of_node_put(gvh_dn);
ep_dn = of_find_node_by_path(ep_path);