msm: ipa3: Fix to avoid accessing of uninitialized structure
Added code changes to check ipa3_ctx initilized or not during bootup in sdm670. Change-Id: I03e5b8de30c77da140e9575c2315b0878cf5363c Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com> Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
This commit is contained in:
parent
a49bb61510
commit
ec183bfa20
1 changed files with 4 additions and 0 deletions
|
@ -5473,6 +5473,10 @@ static int ipa3_smp2p_probe(struct device *dev)
|
|||
struct device_node *node = dev->of_node;
|
||||
int res;
|
||||
|
||||
if (ipa3_ctx == NULL) {
|
||||
IPAERR("ipa3_ctx was not initialized\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
IPADBG("node->name=%s\n", node->name);
|
||||
if (strcmp("qcom,smp2pgpio_map_ipa_1_out", node->name) == 0) {
|
||||
res = of_get_gpio(node, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue