Merge "platform: msm: resolve NULL pointer dereference issue"
This commit is contained in:
commit
7454980b83
4 changed files with 5 additions and 5 deletions
|
@ -318,7 +318,7 @@ static int _msm_parse_dt(struct device_node *node, u32 *client_id)
|
||||||
const char *client_id_str;
|
const char *client_id_str;
|
||||||
|
|
||||||
client_id_str = of_get_property(node, "qcom,client-id", &len);
|
client_id_str = of_get_property(node, "qcom,client-id", &len);
|
||||||
if (len != CLIENT_ID_LEN_IN_CHARS) {
|
if (!client_id_str || len != CLIENT_ID_LEN_IN_CHARS) {
|
||||||
DBG("client_id_str len(%d) is invalid\n", len);
|
DBG("client_id_str len(%d) is invalid\n", len);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -1726,7 +1726,7 @@ int qpnp_adc_get_revid_version(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
revid_data = get_revid_data(revid_dev_node);
|
revid_data = get_revid_data(revid_dev_node);
|
||||||
if (IS_ERR(revid_data)) {
|
if (IS_ERR_OR_NULL(revid_data)) {
|
||||||
pr_debug("revid error rc = %ld\n", PTR_ERR(revid_data));
|
pr_debug("revid error rc = %ld\n", PTR_ERR(revid_data));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1481,8 +1481,8 @@ static int cnss_smmu_init(struct device *dev)
|
||||||
penv->smmu_iova_start,
|
penv->smmu_iova_start,
|
||||||
penv->smmu_iova_len);
|
penv->smmu_iova_len);
|
||||||
if (IS_ERR(mapping)) {
|
if (IS_ERR(mapping)) {
|
||||||
pr_err("%s: create mapping failed, err = %d\n", __func__, ret);
|
|
||||||
ret = PTR_ERR(mapping);
|
ret = PTR_ERR(mapping);
|
||||||
|
pr_err("%s: create mapping failed, err = %d\n", __func__, ret);
|
||||||
goto map_fail;
|
goto map_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ struct page_ext *lookup_page_ext(struct page *page)
|
||||||
* This check is also necessary for ensuring page poisoning
|
* This check is also necessary for ensuring page poisoning
|
||||||
* works as expected when enabled
|
* works as expected when enabled
|
||||||
*/
|
*/
|
||||||
if (!section->page_ext)
|
if (!section || !section->page_ext)
|
||||||
return NULL;
|
return NULL;
|
||||||
return section->page_ext + pfn;
|
return section->page_ext + pfn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue